From f1885386f6246ac7b6f8d3f0aef247988f48ee7a Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 12 Oct 2018 11:14:27 -0400 Subject: [PATCH] Make float exponent output on Windows look the same as elsewhere. Windows, alone among our supported platforms, likes to emit three-digit exponent fields even when two digits would do. Adjust such results to look like the way everyone else does it. Eliminate a bunch of variant expected-output files that were needed only because of this quirk. Discussion: https://postgr.es/m/2934.1539122454@sss.pgh.pa.us --- contrib/cube/expected/cube_sci_1.out | 106 - contrib/seg/expected/seg_1.out | 1266 ----- .../compat_informix-dec_test-MinGW32.stdout | 1293 ----- .../pgtypeslib-num_test-MinGW32.stdout | 6 - .../pgtypeslib-num_test2-MinGW32.stdout | 1117 ---- src/interfaces/ecpg/test/resultmap | 12 - src/port/snprintf.c | 27 + .../expected/float4-exp-three-digits.out | 259 - .../float8-exp-three-digits-win32.out | 586 -- src/test/regress/expected/geometry_1.out | 4890 ----------------- .../expected/int8-exp-three-digits.out | 888 --- src/test/regress/resultmap | 12 - 12 files changed, 27 insertions(+), 10435 deletions(-) delete mode 100644 contrib/cube/expected/cube_sci_1.out delete mode 100644 contrib/seg/expected/seg_1.out delete mode 100644 src/interfaces/ecpg/test/expected/compat_informix-dec_test-MinGW32.stdout delete mode 100644 src/interfaces/ecpg/test/expected/pgtypeslib-num_test-MinGW32.stdout delete mode 100644 src/interfaces/ecpg/test/expected/pgtypeslib-num_test2-MinGW32.stdout delete mode 100644 src/interfaces/ecpg/test/resultmap delete mode 100644 src/test/regress/expected/float4-exp-three-digits.out delete mode 100644 src/test/regress/expected/float8-exp-three-digits-win32.out delete mode 100644 src/test/regress/expected/geometry_1.out delete mode 100644 src/test/regress/expected/int8-exp-three-digits.out diff --git a/contrib/cube/expected/cube_sci_1.out b/contrib/cube/expected/cube_sci_1.out deleted file mode 100644 index 6b1ba9e2fe..0000000000 --- a/contrib/cube/expected/cube_sci_1.out +++ /dev/null @@ -1,106 +0,0 @@ ---- ---- Testing cube output in scientific notation. This was put into separate ---- test, because has platform-depending output. ---- -SELECT '1e27'::cube AS cube; - cube ----------- - (1e+027) -(1 row) - -SELECT '-1e27'::cube AS cube; - cube ------------ - (-1e+027) -(1 row) - -SELECT '1.0e27'::cube AS cube; - cube ----------- - (1e+027) -(1 row) - -SELECT '-1.0e27'::cube AS cube; - cube ------------ - (-1e+027) -(1 row) - -SELECT '1e+27'::cube AS cube; - cube ----------- - (1e+027) -(1 row) - -SELECT '-1e+27'::cube AS cube; - cube ------------ - (-1e+027) -(1 row) - -SELECT '1.0e+27'::cube AS cube; - cube ----------- - (1e+027) -(1 row) - -SELECT '-1.0e+27'::cube AS cube; - cube ------------ - (-1e+027) -(1 row) - -SELECT '1e-7'::cube AS cube; - cube ----------- - (1e-007) -(1 row) - -SELECT '-1e-7'::cube AS cube; - cube ------------ - (-1e-007) -(1 row) - -SELECT '1.0e-7'::cube AS cube; - cube ----------- - (1e-007) -(1 row) - -SELECT '-1.0e-7'::cube AS cube; - cube ------------ - (-1e-007) -(1 row) - -SELECT '1e-300'::cube AS cube; - cube ----------- - (1e-300) -(1 row) - -SELECT '-1e-300'::cube AS cube; - cube ------------ - (-1e-300) -(1 row) - -SELECT '1234567890123456'::cube AS cube; - cube -------------------------- - (1.23456789012346e+015) -(1 row) - -SELECT '+1234567890123456'::cube AS cube; - cube -------------------------- - (1.23456789012346e+015) -(1 row) - -SELECT '-1234567890123456'::cube AS cube; - cube --------------------------- - (-1.23456789012346e+015) -(1 row) - diff --git a/contrib/seg/expected/seg_1.out b/contrib/seg/expected/seg_1.out deleted file mode 100644 index 48abb65bb0..0000000000 --- a/contrib/seg/expected/seg_1.out +++ /dev/null @@ -1,1266 +0,0 @@ --- --- Test seg datatype --- -CREATE EXTENSION seg; --- Check whether any of our opclasses fail amvalidate -SELECT amname, opcname -FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod -WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid); - amname | opcname ---------+--------- -(0 rows) - --- --- testing the input and output functions --- --- Any number -SELECT '1'::seg AS seg; - seg ------ - 1 -(1 row) - -SELECT '-1'::seg AS seg; - seg ------ - -1 -(1 row) - -SELECT '1.0'::seg AS seg; - seg ------ - 1.0 -(1 row) - -SELECT '-1.0'::seg AS seg; - seg ------- - -1.0 -(1 row) - -SELECT '1e7'::seg AS seg; - seg --------- - 1e+007 -(1 row) - -SELECT '-1e7'::seg AS seg; - seg ---------- - -1e+007 -(1 row) - -SELECT '1.0e7'::seg AS seg; - seg ----------- - 1.0e+007 -(1 row) - -SELECT '-1.0e7'::seg AS seg; - seg ------------ - -1.0e+007 -(1 row) - -SELECT '1e+7'::seg AS seg; - seg --------- - 1e+007 -(1 row) - -SELECT '-1e+7'::seg AS seg; - seg ---------- - -1e+007 -(1 row) - -SELECT '1.0e+7'::seg AS seg; - seg ----------- - 1.0e+007 -(1 row) - -SELECT '-1.0e+7'::seg AS seg; - seg ------------ - -1.0e+007 -(1 row) - -SELECT '1e-7'::seg AS seg; - seg --------- - 1e-007 -(1 row) - -SELECT '-1e-7'::seg AS seg; - seg ---------- - -1e-007 -(1 row) - -SELECT '1.0e-7'::seg AS seg; - seg ----------- - 1.0e-007 -(1 row) - -SELECT '-1.0e-7'::seg AS seg; - seg ------------ - -1.0e-007 -(1 row) - -SELECT '2e-6'::seg AS seg; - seg --------- - 2e-006 -(1 row) - -SELECT '2e-5'::seg AS seg; - seg --------- - 2e-005 -(1 row) - -SELECT '2e-4'::seg AS seg; - seg --------- - 0.0002 -(1 row) - -SELECT '2e-3'::seg AS seg; - seg -------- - 0.002 -(1 row) - -SELECT '2e-2'::seg AS seg; - seg ------- - 0.02 -(1 row) - -SELECT '2e-1'::seg AS seg; - seg ------ - 0.2 -(1 row) - -SELECT '2e-0'::seg AS seg; - seg ------ - 2 -(1 row) - -SELECT '2e+0'::seg AS seg; - seg ------ - 2 -(1 row) - -SELECT '2e+1'::seg AS seg; - seg ------ - 2e1 -(1 row) - -SELECT '2e+2'::seg AS seg; - seg ------ - 2e2 -(1 row) - -SELECT '2e+3'::seg AS seg; - seg ------ - 2e3 -(1 row) - -SELECT '2e+4'::seg AS seg; - seg ------ - 2e4 -(1 row) - -SELECT '2e+5'::seg AS seg; - seg --------- - 2e+005 -(1 row) - -SELECT '2e+6'::seg AS seg; - seg --------- - 2e+006 -(1 row) - --- Significant digits preserved -SELECT '1'::seg AS seg; - seg ------ - 1 -(1 row) - -SELECT '1.0'::seg AS seg; - seg ------ - 1.0 -(1 row) - -SELECT '1.00'::seg AS seg; - seg ------- - 1.00 -(1 row) - -SELECT '1.000'::seg AS seg; - seg -------- - 1.000 -(1 row) - -SELECT '1.0000'::seg AS seg; - seg --------- - 1.0000 -(1 row) - -SELECT '1.00000'::seg AS seg; - seg ---------- - 1.00000 -(1 row) - -SELECT '1.000000'::seg AS seg; - seg ---------- - 1.00000 -(1 row) - -SELECT '0.000000120'::seg AS seg; - seg ------------ - 1.20e-007 -(1 row) - -SELECT '3.400e5'::seg AS seg; - seg ------------- - 3.400e+005 -(1 row) - --- Digits truncated -SELECT '12.34567890123456'::seg AS seg; - seg ---------- - 12.3457 -(1 row) - --- Numbers with certainty indicators -SELECT '~6.5'::seg AS seg; - seg ------- - ~6.5 -(1 row) - -SELECT '<6.5'::seg AS seg; - seg ------- - <6.5 -(1 row) - -SELECT '>6.5'::seg AS seg; - seg ------- - >6.5 -(1 row) - -SELECT '~ 6.5'::seg AS seg; - seg ------- - ~6.5 -(1 row) - -SELECT '< 6.5'::seg AS seg; - seg ------- - <6.5 -(1 row) - -SELECT '> 6.5'::seg AS seg; - seg ------- - >6.5 -(1 row) - --- Open intervals -SELECT '0..'::seg AS seg; - seg ------- - 0 .. -(1 row) - -SELECT '0...'::seg AS seg; - seg ------- - 0 .. -(1 row) - -SELECT '0 ..'::seg AS seg; - seg ------- - 0 .. -(1 row) - -SELECT '0 ...'::seg AS seg; - seg ------- - 0 .. -(1 row) - -SELECT '..0'::seg AS seg; - seg ------- - .. 0 -(1 row) - -SELECT '...0'::seg AS seg; - seg ------- - .. 0 -(1 row) - -SELECT '.. 0'::seg AS seg; - seg ------- - .. 0 -(1 row) - -SELECT '... 0'::seg AS seg; - seg ------- - .. 0 -(1 row) - --- Finite intervals -SELECT '0 .. 1'::seg AS seg; - seg --------- - 0 .. 1 -(1 row) - -SELECT '-1 .. 0'::seg AS seg; - seg ---------- - -1 .. 0 -(1 row) - -SELECT '-1 .. 1'::seg AS seg; - seg ---------- - -1 .. 1 -(1 row) - --- (+/-) intervals -SELECT '0(+-)1'::seg AS seg; - seg ---------- - -1 .. 1 -(1 row) - -SELECT '0(+-)1.0'::seg AS seg; - seg -------------- - -1.0 .. 1.0 -(1 row) - -SELECT '1.0(+-)0.005'::seg AS seg; - seg ----------------- - 0.995 .. 1.005 -(1 row) - -SELECT '101(+-)1'::seg AS seg; - seg ------------------- - 1.00e2 .. 1.02e2 -(1 row) - --- incorrect number of significant digits in 99.0: -SELECT '100(+-)1'::seg AS seg; - seg ----------------- - 99.0 .. 1.01e2 -(1 row) - --- invalid input -SELECT ''::seg AS seg; -ERROR: bad seg representation -LINE 1: SELECT ''::seg AS seg; - ^ -DETAIL: syntax error at end of input -SELECT 'ABC'::seg AS seg; -ERROR: bad seg representation -LINE 1: SELECT 'ABC'::seg AS seg; - ^ -DETAIL: syntax error at or near "A" -SELECT '1ABC'::seg AS seg; -ERROR: bad seg representation -LINE 1: SELECT '1ABC'::seg AS seg; - ^ -DETAIL: syntax error at or near "A" -SELECT '1.'::seg AS seg; -ERROR: bad seg representation -LINE 1: SELECT '1.'::seg AS seg; - ^ -DETAIL: syntax error at or near "." -SELECT '1.....'::seg AS seg; -ERROR: bad seg representation -LINE 1: SELECT '1.....'::seg AS seg; - ^ -DETAIL: syntax error at or near ".." -SELECT '.1'::seg AS seg; -ERROR: bad seg representation -LINE 1: SELECT '.1'::seg AS seg; - ^ -DETAIL: syntax error at or near "." -SELECT '1..2.'::seg AS seg; -ERROR: bad seg representation -LINE 1: SELECT '1..2.'::seg AS seg; - ^ -DETAIL: syntax error at or near "." -SELECT '1 e7'::seg AS seg; -ERROR: bad seg representation -LINE 1: SELECT '1 e7'::seg AS seg; - ^ -DETAIL: syntax error at or near "e" -SELECT '1e700'::seg AS seg; -ERROR: "1e700" is out of range for type real -LINE 1: SELECT '1e700'::seg AS seg; - ^ --- --- testing the operators --- --- equality/inequality: --- -SELECT '24 .. 33.20'::seg = '24 .. 33.20'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '24 .. 33.20'::seg = '24 .. 33.21'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '24 .. 33.20'::seg != '24 .. 33.20'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '24 .. 33.20'::seg != '24 .. 33.21'::seg AS bool; - bool ------- - t -(1 row) - --- overlap --- -SELECT '1'::seg && '1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '1'::seg && '2'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '0 ..'::seg && '0 ..'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 1'::seg && '0 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '..0'::seg && '0..'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '-1 .. 0.1'::seg && '0 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '-1 .. 0'::seg && '0 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '-1 .. -0.0001'::seg && '0 .. 1'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '0 ..'::seg && '1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 1'::seg && '1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 1'::seg && '2'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '0 .. 2'::seg && '1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '1'::seg && '0 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '2'::seg && '0 .. 1'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '1'::seg && '0 .. 2'::seg AS bool; - bool ------- - t -(1 row) - --- overlap on the left --- -SELECT '1'::seg &< '0'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '1'::seg &< '1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '1'::seg &< '2'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 1'::seg &< '0'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '0 .. 1'::seg &< '1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 1'::seg &< '2'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 1'::seg &< '0 .. 0.5'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '0 .. 1'::seg &< '0 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 1'::seg &< '0 .. 2'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 1'::seg &< '1 .. 2'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 1'::seg &< '2 .. 3'::seg AS bool; - bool ------- - t -(1 row) - --- overlap on the right --- -SELECT '0'::seg &> '1'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '1'::seg &> '1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '2'::seg &> '1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0'::seg &> '0 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '1'::seg &> '0 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '2'::seg &> '0 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 0.5'::seg &> '0 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 1'::seg &> '0 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 2'::seg &> '0 .. 2'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '1 .. 2'::seg &> '0 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '2 .. 3'::seg &> '0 .. 1'::seg AS bool; - bool ------- - t -(1 row) - --- left --- -SELECT '1'::seg << '0'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '1'::seg << '1'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '1'::seg << '2'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 1'::seg << '0'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '0 .. 1'::seg << '1'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '0 .. 1'::seg << '2'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 1'::seg << '0 .. 0.5'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '0 .. 1'::seg << '0 .. 1'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '0 .. 1'::seg << '0 .. 2'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '0 .. 1'::seg << '1 .. 2'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '0 .. 1'::seg << '2 .. 3'::seg AS bool; - bool ------- - t -(1 row) - --- right --- -SELECT '0'::seg >> '1'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '1'::seg >> '1'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '2'::seg >> '1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0'::seg >> '0 .. 1'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '1'::seg >> '0 .. 1'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '2'::seg >> '0 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. 0.5'::seg >> '0 .. 1'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '0 .. 1'::seg >> '0 .. 1'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '0 .. 2'::seg >> '0 .. 2'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '1 .. 2'::seg >> '0 .. 1'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '2 .. 3'::seg >> '0 .. 1'::seg AS bool; - bool ------- - t -(1 row) - --- "contained in" (the left value belongs within the interval specified in the right value): --- -SELECT '0'::seg <@ '0'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0'::seg <@ '0 ..'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0'::seg <@ '.. 0'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0'::seg <@ '-1 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0'::seg <@ '-1 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '-1'::seg <@ '-1 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '1'::seg <@ '-1 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '-1 .. 1'::seg <@ '-1 .. 1'::seg AS bool; - bool ------- - t -(1 row) - --- "contains" (the left value contains the interval specified in the right value): --- -SELECT '0'::seg @> '0'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '0 .. '::seg <@ '0'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '.. 0'::seg <@ '0'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '-1 .. 1'::seg <@ '0'::seg AS bool; - bool ------- - f -(1 row) - -SELECT '0'::seg <@ '-1 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '-1'::seg <@ '-1 .. 1'::seg AS bool; - bool ------- - t -(1 row) - -SELECT '1'::seg <@ '-1 .. 1'::seg AS bool; - bool ------- - t -(1 row) - --- Load some example data and build the index --- -CREATE TABLE test_seg (s seg); -\copy test_seg from 'data/test_seg.data' -CREATE INDEX test_seg_ix ON test_seg USING gist (s); -EXPLAIN (COSTS OFF) -SELECT count(*) FROM test_seg WHERE s @> '11..11.3'; - QUERY PLAN -------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on test_seg - Recheck Cond: (s @> '1.1e1 .. 11.3'::seg) - -> Bitmap Index Scan on test_seg_ix - Index Cond: (s @> '1.1e1 .. 11.3'::seg) -(5 rows) - -SELECT count(*) FROM test_seg WHERE s @> '11..11.3'; - count -------- - 143 -(1 row) - -SET enable_bitmapscan = false; -EXPLAIN (COSTS OFF) -SELECT count(*) FROM test_seg WHERE s @> '11..11.3'; - QUERY PLAN ------------------------------------------------------ - Aggregate - -> Index Only Scan using test_seg_ix on test_seg - Index Cond: (s @> '1.1e1 .. 11.3'::seg) -(3 rows) - -SELECT count(*) FROM test_seg WHERE s @> '11..11.3'; - count -------- - 143 -(1 row) - -RESET enable_bitmapscan; --- Test sorting -SELECT * FROM test_seg WHERE s @> '11..11.3' GROUP BY s; - s ------------------ - .. 4.0e1 - .. >8.2e1 - .. 9.0e1 - <1.0 .. >13.0 - 1.3 .. 12.0 - 2.0 .. 11.5 - 2.1 .. 11.8 - <2.3 .. - >2.3 .. - 2.4 .. 11.3 - 2.5 .. 11.5 - 2.5 .. 11.8 - 2.6 .. - 2.7 .. 12.0 - <3.0 .. - 3 .. 5.8e1 - 3.1 .. 11.5 - 3.5 .. 11.5 - 3.5 .. 12.2 - <4.0 .. >1.2e1 - <4.0 .. - 4 .. 1.2e1 - 4.0 .. 11.7 - 4.0 .. 12.5 - 4.0 .. 13.0 - 4.0 .. 6.0e1 - 4.0 .. - 4.2 .. 11.5 - 4.2 .. 11.7 - <4.5 .. >1.2e1 - 4.5 .. 11.5 - 4.5 .. <1.2e1 - 4.5 .. >1.2e1 - 4.5 .. 12.5 - 4.5 .. 1.15e2 - 4.7 .. 11.8 - 4.8 .. 11.5 - 4.8 .. 11.6 - 4.8 .. 12.5 - 4.8 .. - 4.9 .. >1.2e1 - 4.9 .. - 5 .. 11.5 - 5 .. 1.2e1 - 5 .. 3.0e1 - 5.0 .. 11.4 - 5.0 .. 11.5 - 5.0 .. 11.6 - 5.0 .. 11.7 - 5.0 .. 12.0 - 5.0 .. >12.0 - 5.0 .. >1.2e1 - 5.2 .. 11.5 - 5.2 .. >1.2e1 - 5.25 .. >1.2e1 - 5.3 .. 11.5 - 5.3 .. 1.3e1 - 5.3 .. >9.0e1 - 5.3 .. - 5.4 .. - 5.5 .. 11.5 - 5.5 .. 11.7 - 5.5 .. 1.2e1 - 5.5 .. >1.2e1 - 5.5 .. 12.5 - 5.5 .. 13.5 - 5.5 .. - >5.5 .. - 5.7 .. - 5.9 .. - 6 .. 11.5 - 6 .. >1.2e1 - 6.0 .. 11.5 - 6.0 .. 1.3e1 - >6.0 .. <11.5 - 6.1 .. >1.2e1 - 6.1 .. - 6.2 .. >11.5 - 6.3 .. - 6.5 .. 11.5 - 6.5 .. 12.0 - 6.5 .. >12.0 - 6.5 .. - 6.6 .. - 6.7 .. 11.5 - 6.7 .. - 6.75 .. - 6.8 .. - 6.9 .. 12.2 - 6.9 .. >9.0e1 - 6.9 .. - <7.0 .. >11.5 - 7.0 .. 11.5 - 7.0 .. >11.5 - 7.0 .. - >7.15 .. - 7.2 .. 13.5 - 7.3 .. >9.0e1 - 7.3 .. - >7.3 .. - 7.4 .. 12.1 - 7.4 .. - 7.5 .. 11.5 - 7.5 .. 12.0 - 7.5 .. - 7.7 .. 11.5 - 7.7 .. - 7.75 .. - 8.0 .. 11.7 - 8.0 .. 12.0 - 8.0 .. >13.0 - 8.2 .. - 8.3 .. - 8.5 .. >11.5 - 8.5 .. 12.5 - 8.5 .. - 8.6 .. >9.9e1 - 8.7 .. 11.3 - 8.7 .. 11.7 - 8.9 .. 11.5 - 9 .. >1.2e1 - 9.0 .. 11.3 - 9.0 .. 11.5 - 9.0 .. 1.2e1 - 9.0 .. - 9.2 .. 1.2e1 - 9.4 .. 12.2 - <9.5 .. 1.2e1 - <9.5 .. >12.2 - 9.5 .. - 9.6 .. 11.5 - 9.7 .. 11.5 - 9.7 .. >1.2e1 - 9.8 .. >12.5 - <1.0e1 .. >11.6 - 10.0 .. 11.5 - 10.0 .. 12.5 - 10.0 .. >12.5 - 10.2 .. 11.8 - <10.5 .. 11.5 - 10.5 .. 11.5 - 10.5 .. <13.5 - 10.7 .. 12.3 -(143 rows) - --- Test functions -SELECT seg_lower(s), seg_center(s), seg_upper(s) -FROM test_seg WHERE s @> '11.2..11.3' OR s IS NULL ORDER BY s; - seg_lower | seg_center | seg_upper ------------+------------+----------- - -Infinity | -Infinity | 40 - -Infinity | -Infinity | 82 - -Infinity | -Infinity | 90 - 1 | 7 | 13 - 1.3 | 6.65 | 12 - 2 | 6.75 | 11.5 - 2.1 | 6.95 | 11.8 - 2.3 | Infinity | Infinity - 2.3 | Infinity | Infinity - 2.4 | 6.85 | 11.3 - 2.5 | 7 | 11.5 - 2.5 | 7.15 | 11.8 - 2.6 | Infinity | Infinity - 2.7 | 7.35 | 12 - 3 | Infinity | Infinity - 3 | 30.5 | 58 - 3.1 | 7.3 | 11.5 - 3.5 | 7.5 | 11.5 - 3.5 | 7.85 | 12.2 - 4 | 8 | 12 - 4 | Infinity | Infinity - 4 | 8 | 12 - 4 | 7.85 | 11.7 - 4 | 8.25 | 12.5 - 4 | 8.5 | 13 - 4 | 32 | 60 - 4 | Infinity | Infinity - 4.2 | 7.85 | 11.5 - 4.2 | 7.95 | 11.7 - 4.5 | 8.25 | 12 - 4.5 | 8 | 11.5 - 4.5 | 8.25 | 12 - 4.5 | 8.25 | 12 - 4.5 | 8.5 | 12.5 - 4.5 | 59.75 | 115 - 4.7 | 8.25 | 11.8 - 4.8 | 8.15 | 11.5 - 4.8 | 8.2 | 11.6 - 4.8 | 8.65 | 12.5 - 4.8 | Infinity | Infinity - 4.9 | 8.45 | 12 - 4.9 | Infinity | Infinity - 5 | 8.25 | 11.5 - 5 | 8.5 | 12 - 5 | 17.5 | 30 - 5 | 8.2 | 11.4 - 5 | 8.25 | 11.5 - 5 | 8.3 | 11.6 - 5 | 8.35 | 11.7 - 5 | 8.5 | 12 - 5 | 8.5 | 12 - 5 | 8.5 | 12 - 5.2 | 8.35 | 11.5 - 5.2 | 8.6 | 12 - 5.25 | 8.625 | 12 - 5.3 | 8.4 | 11.5 - 5.3 | 9.15 | 13 - 5.3 | 47.65 | 90 - 5.3 | Infinity | Infinity - 5.4 | Infinity | Infinity - 5.5 | 8.5 | 11.5 - 5.5 | 8.6 | 11.7 - 5.5 | 8.75 | 12 - 5.5 | 8.75 | 12 - 5.5 | 9 | 12.5 - 5.5 | 9.5 | 13.5 - 5.5 | Infinity | Infinity - 5.5 | Infinity | Infinity - 5.7 | Infinity | Infinity - 5.9 | Infinity | Infinity - 6 | 8.75 | 11.5 - 6 | 9 | 12 - 6 | 8.75 | 11.5 - 6 | 9.5 | 13 - 6 | 8.75 | 11.5 - 6.1 | 9.05 | 12 - 6.1 | Infinity | Infinity - 6.2 | 8.85 | 11.5 - 6.3 | Infinity | Infinity - 6.5 | 9 | 11.5 - 6.5 | 9.25 | 12 - 6.5 | 9.25 | 12 - 6.5 | Infinity | Infinity - 6.6 | Infinity | Infinity - 6.7 | 9.1 | 11.5 - 6.7 | Infinity | Infinity - 6.75 | Infinity | Infinity - 6.8 | Infinity | Infinity - 6.9 | 9.55 | 12.2 - 6.9 | 48.45 | 90 - 6.9 | Infinity | Infinity - 7 | 9.25 | 11.5 - 7 | 9.25 | 11.5 - 7 | 9.25 | 11.5 - 7 | Infinity | Infinity - 7.15 | Infinity | Infinity - 7.2 | 10.35 | 13.5 - 7.3 | 48.65 | 90 - 7.3 | Infinity | Infinity - 7.3 | Infinity | Infinity - 7.4 | 9.75 | 12.1 - 7.4 | Infinity | Infinity - 7.5 | 9.5 | 11.5 - 7.5 | 9.75 | 12 - 7.5 | Infinity | Infinity - 7.7 | 9.6 | 11.5 - 7.7 | Infinity | Infinity - 7.75 | Infinity | Infinity - 8 | 9.85 | 11.7 - 8 | 10 | 12 - 8 | 10.5 | 13 - 8.2 | Infinity | Infinity - 8.3 | Infinity | Infinity - 8.5 | 10 | 11.5 - 8.5 | 10.5 | 12.5 - 8.5 | Infinity | Infinity - 8.6 | 53.8 | 99 - 8.7 | 10 | 11.3 - 8.7 | 10.2 | 11.7 - 8.9 | 10.2 | 11.5 - 9 | 10.5 | 12 - 9 | 10.15 | 11.3 - 9 | 10.25 | 11.5 - 9 | 10.5 | 12 - 9 | Infinity | Infinity - 9.2 | 10.6 | 12 - 9.4 | 10.8 | 12.2 - 9.5 | 10.75 | 12 - 9.5 | 10.85 | 12.2 - 9.5 | Infinity | Infinity - 9.6 | 10.55 | 11.5 - 9.7 | 10.6 | 11.5 - 9.7 | 10.85 | 12 - 9.8 | 11.15 | 12.5 - 10 | 10.8 | 11.6 - 10 | 10.75 | 11.5 - 10 | 11.25 | 12.5 - 10 | 11.25 | 12.5 - 10.2 | 11 | 11.8 - 10.5 | 11 | 11.5 - 10.5 | 11 | 11.5 - 10.5 | 12 | 13.5 - 10.7 | 11.5 | 12.3 - | | -(144 rows) - diff --git a/src/interfaces/ecpg/test/expected/compat_informix-dec_test-MinGW32.stdout b/src/interfaces/ecpg/test/expected/compat_informix-dec_test-MinGW32.stdout deleted file mode 100644 index 91faa2c04c..0000000000 --- a/src/interfaces/ecpg/test/expected/compat_informix-dec_test-MinGW32.stdout +++ /dev/null @@ -1,1293 +0,0 @@ -(no errno set) - dec[0,1]: r: -1, * -(no errno set) - dec[0,2]: r: -1, * -(no errno set) - dec[0,3]: r: -1, * -(no errno set) - dec[0,4]: r: -1, * -dec[0,5]: r: 0, 0.00 -(errno == PGTYPES_NUM_OVERFLOW) - dec[0,6]: 0 (r: -1) -(errno == PGTYPES_NUM_OVERFLOW) - dec[0,8]: 0 (r: -1) -(errno == PGTYPES_NUM_OVERFLOW) - dec[0,10]: 0 (r: -1) - -dec[1,1]: r: 0, -2 -dec[1,2]: r: 0, -2 -dec[1,3]: r: 0, -2.0 -dec[1,4]: r: 0, -2.00 -dec[1,5]: r: 0, 0.00 -dec[1,6]: -2 (r: 0) -dec[1,7]: -2.00 (r: 0 - cmp: 0) -dec[1,8]: -2 (r: 0) -dec[1,9]: -2.00 (r: 0 - cmp: 0) -dec[1,10]: -2 (r: 0) - -dec[2,1]: r: 0, 0.794 -dec[2,2]: r: 0, 1 -dec[2,3]: r: 0, 0.8 -dec[2,4]: r: 0, 0.79 -dec[2,5]: r: 0, 0.00 -dec[2,6]: 1 (r: 0) -dec[2,7]: 1.00 (r: 0 - cmp: -1) -dec[2,8]: 1 (r: 0) -dec[2,9]: 1.00 (r: 0 - cmp: -1) -dec[2,10]: 0.794 (r: 0) - -dec[3,1]: r: 0, 3.44 -dec[3,2]: r: 0, 3 -dec[3,3]: r: 0, 3.4 -dec[3,4]: r: 0, 3.44 -dec[3,5]: r: 0, 0.00 -dec[3,6]: 3 (r: 0) -dec[3,7]: 3.00 (r: 0 - cmp: 1) -dec[3,8]: 3 (r: 0) -dec[3,9]: 3.00 (r: 0 - cmp: 1) -dec[3,10]: 3.44 (r: 0) - -dec[4,1]: r: 0, 592490000000000000000000 -dec[4,2]: r: 0, 592490000000000000000000 -dec[4,3]: r: 0, 592490000000000000000000.0 -dec[4,4]: r: 0, 592490000000000000000000.00 -dec[4,5]: r: 0, 0.00 -(errno == PGTYPES_NUM_OVERFLOW) - dec[4,6]: 0 (r: -1) -(errno == PGTYPES_NUM_OVERFLOW) - dec[4,8]: 0 (r: -1) -dec[4,10]: 5.9249e+023 (r: 0) - -dec[5,1]: r: 0, -328400 -dec[5,2]: r: 0, -328400 -dec[5,3]: r: 0, -328400.0 -dec[5,4]: r: 0, -328400.00 -dec[5,5]: r: 0, 0.00 -dec[5,6]: -328400 (r: 0) -dec[5,7]: -328400.00 (r: 0 - cmp: 0) -dec[5,8]: -328400 (r: 0) -dec[5,9]: -328400.00 (r: 0 - cmp: 0) -dec[5,10]: -328400 (r: 0) - -(no errno set) - dec[6,1]: r: -1, * -dec[6,2]: r: 0, 0 -dec[6,3]: r: 0, 0.0 -dec[6,4]: r: 0, 0.00 -dec[6,5]: r: 0, 0.00 -dec[6,6]: 0 (r: 0) -dec[6,7]: 0.00 (r: 0 - cmp: 1) -dec[6,8]: 0 (r: 0) -dec[6,9]: 0.00 (r: 0 - cmp: 1) - -dec[7,1]: r: 0, 0.001 -dec[7,2]: r: 0, 0 -dec[7,3]: r: 0, 0.0 -dec[7,4]: r: 0, 0.00 -dec[7,5]: r: 0, 0.00 -dec[7,6]: 0 (r: 0) -dec[7,7]: 0.00 (r: 0 - cmp: 1) -dec[7,8]: 0 (r: 0) -dec[7,9]: 0.00 (r: 0 - cmp: 1) -dec[7,10]: 0.001 (r: 0) - -dec[8,1]: r: 0, 0.0 -dec[8,2]: r: 0, 0 -dec[8,3]: r: 0, 0.0 -dec[8,4]: r: 0, 0.00 -dec[8,5]: r: 0, 0.00 -dec[8,6]: 0 (r: 0) -dec[8,7]: 0.00 (r: 0 - cmp: 0) -dec[8,8]: 0 (r: 0) -dec[8,9]: 0.00 (r: 0 - cmp: 0) -dec[8,10]: 0 (r: 0) - -dec[9,1]: r: 0, -0.000059249 -dec[9,2]: r: 0, -0 -dec[9,3]: r: 0, -0.0 -dec[9,4]: r: 0, -0.00 -dec[9,5]: r: 0, 0.00 -dec[9,6]: 0 (r: 0) -dec[9,7]: 0.00 (r: 0 - cmp: -1) -dec[9,8]: 0 (r: 0) -dec[9,9]: 0.00 (r: 0 - cmp: -1) -dec[9,10]: -5.9249e-005 (r: 0) - -dec[10,1]: r: 0, 0.003284 -dec[10,2]: r: 0, 0 -dec[10,3]: r: 0, 0.0 -dec[10,4]: r: 0, 0.00 -dec[10,5]: r: 0, 0.00 -dec[10,6]: 0 (r: 0) -dec[10,7]: 0.00 (r: 0 - cmp: 1) -dec[10,8]: 0 (r: 0) -dec[10,9]: 0.00 (r: 0 - cmp: 1) -dec[10,10]: 0.003284 (r: 0) - -dec[11,1]: r: 0, 0.500001 -dec[11,2]: r: 0, 1 -dec[11,3]: r: 0, 0.5 -dec[11,4]: r: 0, 0.50 -dec[11,5]: r: 0, 0.00 -dec[11,6]: 1 (r: 0) -dec[11,7]: 1.00 (r: 0 - cmp: -1) -dec[11,8]: 1 (r: 0) -dec[11,9]: 1.00 (r: 0 - cmp: -1) -dec[11,10]: 0.500001 (r: 0) - -dec[12,1]: r: 0, -0.5000001 -dec[12,2]: r: 0, -1 -dec[12,3]: r: 0, -0.5 -dec[12,4]: r: 0, -0.50 -dec[12,5]: r: 0, 0.00 -dec[12,6]: -1 (r: 0) -dec[12,7]: -1.00 (r: 0 - cmp: 1) -dec[12,8]: -1 (r: 0) -dec[12,9]: -1.00 (r: 0 - cmp: 1) -dec[12,10]: -0.5 (r: 0) - -dec[13,1]: r: 0, 1234567890123456789012345678.91 -dec[13,2]: r: 0, 1234567890123456789012345679 -dec[13,3]: r: 0, 1234567890123456789012345678.9 -dec[13,4]: r: 0, 1234567890123456789012345678.91 -dec[13,5]: r: 0, 0.00 -(errno == PGTYPES_NUM_OVERFLOW) - dec[13,6]: 0 (r: -1) -(errno == PGTYPES_NUM_OVERFLOW) - dec[13,8]: 0 (r: -1) -dec[13,10]: 1.23457e+027 (r: 0) - -(errno == PGTYPES_NUM_OVERFLOW) - dec[14,0]: r: -1200 -(errno == PGTYPES_NUM_BAD_NUMERIC) - dec[15,0]: r: -1213 -dec[14]: NULL -dec[0]: NOT NULL -(errno == PGTYPES_NUM_BAD_NUMERIC) - dectoasc with len == -1: r: -1 -(errno == PGTYPES_NUM_BAD_NUMERIC) - dectoasc with len == 0: r: -1 -dec[c,0,0]: 0 -dec[a,0,0]: * -dec[s,0,0]: 0 -dec[m,0,0]: * -dec[d,0,0]: 1.00000000000000000 -dec[c,0,1]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,0,1]: -dec[m,0,1]: * -dec[d,0,1]: * -dec[c,0,2]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,0,2]: -dec[m,0,2]: * -dec[d,0,2]: -dec[c,0,3]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,0,3]: -dec[m,0,3]: * -dec[d,0,3]: -dec[c,0,4]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,0,4]: -dec[m,0,4]: * -dec[d,0,4]: -dec[c,0,5]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,0,5]: -dec[m,0,5]: * -dec[d,0,5]: -dec[c,0,6]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,0,6]: -dec[m,0,6]: * -dec[d,0,6]: * -dec[c,0,7]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,0,7]: -dec[m,0,7]: * -dec[d,0,7]: * -dec[c,0,8]: 1 -dec[a,0,8]: * -dec[s,0,8]: * -dec[m,0,8]: 0.0 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202 -dec[c,0,9]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,0,9]: -dec[m,0,9]: * -dec[d,0,9]: -dec[c,0,10]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,0,10]: -dec[m,0,10]: * -dec[d,0,10]: -dec[c,0,11]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,0,11]: -dec[m,0,11]: * -dec[d,0,11]: -dec[c,0,12]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,0,12]: -dec[m,0,12]: * -dec[d,0,12]: -dec[c,0,13]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,0,13]: -dec[m,0,13]: * -dec[d,0,13]: -dec[c,0,14]: 2147483647 -dec[a,0,14]: -dec[s,0,14]: -dec[m,0,14]: * -dec[d,0,14]: -dec[c,1,0]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,1,0]: -dec[m,1,0]: * -dec[d,1,0]: * -dec[c,1,1]: 0 -dec[a,1,1]: -4 -dec[s,1,1]: 0 -dec[m,1,1]: 4 -dec[d,1,1]: 1.00000000000000000 -dec[c,1,2]: -1 -dec[a,1,2]: -1.206 -dec[s,1,2]: -2.794 -dec[m,1,2]: -1.588 -dec[d,1,2]: -2.5188916876574307 -dec[c,1,3]: -1 -dec[a,1,3]: 1.44 -dec[s,1,3]: -5.44 -dec[m,1,3]: -6.88 -dec[d,1,3]: -0.58139534883720930 -dec[c,1,4]: -1 -dec[a,1,4]: 592489999999999999999998 -dec[s,1,4]: -592490000000000000000002 -dec[m,1,4]: -1184980000000000000000000 -dec[d,1,4]: -0.0000000000000000000000033755843980489122 -dec[c,1,5]: 1 -dec[a,1,5]: -328402 -dec[s,1,5]: 328398 -dec[m,1,5]: 656800 -dec[d,1,5]: 0.0000060901339829476248 -dec[c,1,6]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,1,6]: -dec[m,1,6]: * -dec[d,1,6]: * -dec[c,1,7]: -1 -dec[a,1,7]: -1.999 -dec[s,1,7]: -2.001 -dec[m,1,7]: -0.002 -dec[d,1,7]: -2000.0000000000000 -dec[c,1,8]: -1 -dec[a,1,8]: -2.0 -dec[s,1,8]: -2.0 -dec[m,1,8]: 0.0 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202 -dec[c,1,9]: -1 -dec[a,1,9]: -2.000059249 -dec[s,1,9]: -1.999940751 -dec[m,1,9]: 0.000118498 -dec[d,1,9]: 33755.843980489122 -dec[c,1,10]: -1 -dec[a,1,10]: -1.996716 -dec[s,1,10]: -2.003284 -dec[m,1,10]: -0.006568 -dec[d,1,10]: -609.01339829476248 -dec[c,1,11]: -1 -dec[a,1,11]: -1.499999 -dec[s,1,11]: -2.500001 -dec[m,1,11]: -1.000002 -dec[d,1,11]: -3.9999920000160000 -dec[c,1,12]: -1 -dec[a,1,12]: -2.5000001 -dec[s,1,12]: -1.4999999 -dec[m,1,12]: 1.0000002 -dec[d,1,12]: 3.9999992000001600 -dec[c,1,13]: -1 -dec[a,1,13]: 1234567890123456789012345676.91 -dec[s,1,13]: -1234567890123456789012345680.91 -dec[m,1,13]: -2469135780246913578024691357.82 -dec[d,1,13]: -0.0000000000000000000000000016200000145800001 -dec[c,1,14]: 2147483647 -dec[a,1,14]: 1234567890123456789012345676.91 -dec[s,1,14]: -1234567890123456789012345680.91 -dec[m,1,14]: -2469135780246913578024691357.82 -dec[d,1,14]: -0.0000000000000000000000000016200000145800001 -dec[c,2,0]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,2,0]: -dec[m,2,0]: * -dec[d,2,0]: * -dec[c,2,1]: 1 -dec[a,2,1]: -1.206 -dec[s,2,1]: 2.794 -dec[m,2,1]: -1.588 -dec[d,2,1]: -0.39700000000000000 -dec[c,2,2]: 0 -dec[a,2,2]: 1.588 -dec[s,2,2]: 0.000 -dec[m,2,2]: 0.630436 -dec[d,2,2]: 1.00000000000000000 -dec[c,2,3]: -1 -dec[a,2,3]: 4.234 -dec[s,2,3]: -2.646 -dec[m,2,3]: 2.73136 -dec[d,2,3]: 0.23081395348837209 -dec[c,2,4]: -1 -dec[a,2,4]: 592490000000000000000000.794 -dec[s,2,4]: -592489999999999999999999.206 -dec[m,2,4]: 470437060000000000000000.000 -dec[d,2,4]: 0.0000000000000000000000013401070060254182 -dec[c,2,5]: 1 -dec[a,2,5]: -328399.206 -dec[s,2,5]: 328400.794 -dec[m,2,5]: -260749.600 -dec[d,2,5]: -0.0000024177831912302071 -dec[c,2,6]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,2,6]: -dec[m,2,6]: * -dec[d,2,6]: * -dec[c,2,7]: 1 -dec[a,2,7]: 0.795 -dec[s,2,7]: 0.793 -dec[m,2,7]: 0.000794 -dec[d,2,7]: 794.00000000000000 -dec[c,2,8]: 1 -dec[a,2,8]: 0.794 -dec[s,2,8]: 0.794 -dec[m,2,8]: 0.0000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202 -dec[c,2,9]: 1 -dec[a,2,9]: 0.793940751 -dec[s,2,9]: 0.794059249 -dec[m,2,9]: -0.000047043706 -dec[d,2,9]: -13401.070060254182 -dec[c,2,10]: 1 -dec[a,2,10]: 0.797284 -dec[s,2,10]: 0.790716 -dec[m,2,10]: 0.002607496 -dec[d,2,10]: 241.77831912302071 -dec[c,2,11]: 1 -dec[a,2,11]: 1.294001 -dec[s,2,11]: 0.293999 -dec[m,2,11]: 0.397000794 -dec[d,2,11]: 1.5879968240063520 -dec[c,2,12]: 1 -dec[a,2,12]: 0.2939999 -dec[s,2,12]: 1.2940001 -dec[m,2,12]: -0.3970000794 -dec[d,2,12]: -1.5879996824000635 -dec[c,2,13]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,2,13]: -dec[m,2,13]: -dec[d,2,13]: 0.00000000000000000000000000064314000578826005 -dec[c,2,14]: 2147483647 -dec[a,2,14]: -dec[s,2,14]: -dec[m,2,14]: -dec[d,2,14]: 0.00000000000000000000000000064314000578826005 -dec[c,3,0]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,3,0]: -dec[m,3,0]: * -dec[d,3,0]: * -dec[c,3,1]: 1 -dec[a,3,1]: 1.44 -dec[s,3,1]: 5.44 -dec[m,3,1]: -6.88 -dec[d,3,1]: -1.7200000000000000 -dec[c,3,2]: 1 -dec[a,3,2]: 4.234 -dec[s,3,2]: 2.646 -dec[m,3,2]: 2.73136 -dec[d,3,2]: 4.3324937027707809 -dec[c,3,3]: 0 -dec[a,3,3]: 6.88 -dec[s,3,3]: 0.00 -dec[m,3,3]: 11.8336 -dec[d,3,3]: 1.00000000000000000 -dec[c,3,4]: -1 -dec[a,3,4]: 592490000000000000000003.44 -dec[s,3,4]: -592489999999999999999996.56 -dec[m,3,4]: 2038165600000000000000000.00 -dec[d,3,4]: 0.0000000000000000000000058060051646441290 -dec[c,3,5]: 1 -dec[a,3,5]: -328396.56 -dec[s,3,5]: 328403.44 -dec[m,3,5]: -1129696.00 -dec[d,3,5]: -0.0000104750304506699147 -dec[c,3,6]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,3,6]: -dec[m,3,6]: * -dec[d,3,6]: * -dec[c,3,7]: 1 -dec[a,3,7]: 3.441 -dec[s,3,7]: 3.439 -dec[m,3,7]: 0.00344 -dec[d,3,7]: 3440.0000000000000 -dec[c,3,8]: 1 -dec[a,3,8]: 3.44 -dec[s,3,8]: 3.44 -dec[m,3,8]: 0.000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202 -dec[c,3,9]: 1 -dec[a,3,9]: 3.439940751 -dec[s,3,9]: 3.440059249 -dec[m,3,9]: -0.00020381656 -dec[d,3,9]: -58060.051646441290 -dec[c,3,10]: 1 -dec[a,3,10]: 3.443284 -dec[s,3,10]: 3.436716 -dec[m,3,10]: 0.01129696 -dec[d,3,10]: 1047.50304506699147 -dec[c,3,11]: 1 -dec[a,3,11]: 3.940001 -dec[s,3,11]: 2.939999 -dec[m,3,11]: 1.72000344 -dec[d,3,11]: 6.8799862400275199 -dec[c,3,12]: 1 -dec[a,3,12]: 2.9399999 -dec[s,3,12]: 3.9400001 -dec[m,3,12]: -1.720000344 -dec[d,3,12]: -6.8799986240002752 -dec[c,3,13]: -1 -dec[a,3,13]: 1234567890123456789012345682.35 -dec[s,3,13]: -1234567890123456789012345675.47 -dec[m,3,13]: -dec[d,3,13]: 0.0000000000000000000000000027864000250776002 -dec[c,3,14]: 2147483647 -dec[a,3,14]: 1234567890123456789012345682.35 -dec[s,3,14]: -1234567890123456789012345675.47 -dec[m,3,14]: -dec[d,3,14]: 0.0000000000000000000000000027864000250776002 -dec[c,4,0]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,4,0]: -dec[m,4,0]: * -dec[d,4,0]: * -dec[c,4,1]: 1 -dec[a,4,1]: 592489999999999999999998 -dec[s,4,1]: 592490000000000000000002 -dec[m,4,1]: -1184980000000000000000000 -dec[d,4,1]: -296245000000000000000000 -dec[c,4,2]: 1 -dec[a,4,2]: 592490000000000000000000.794 -dec[s,4,2]: 592489999999999999999999.206 -dec[m,4,2]: 470437060000000000000000.000 -dec[d,4,2]: -dec[c,4,3]: 1 -dec[a,4,3]: 592490000000000000000003.44 -dec[s,4,3]: 592489999999999999999996.56 -dec[m,4,3]: 2038165600000000000000000.00 -dec[d,4,3]: 172235465116279069767441.86 -dec[c,4,4]: 0 -dec[a,4,4]: 1184980000000000000000000 -dec[s,4,4]: 0 -dec[m,4,4]: 351044400100000000000000000000000000000000000000 -dec[d,4,4]: 1.00000000000000000 -dec[c,4,5]: 1 -dec[a,4,5]: 592489999999999999671600 -dec[s,4,5]: 592490000000000000328400 -dec[m,4,5]: -194573716000000000000000000000 -dec[d,4,5]: -1804171741778319123 -dec[c,4,6]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,4,6]: -dec[m,4,6]: * -dec[d,4,6]: * -dec[c,4,7]: 1 -dec[a,4,7]: 592490000000000000000000.001 -dec[s,4,7]: 592489999999999999999999.999 -dec[m,4,7]: 592490000000000000000.000 -dec[d,4,7]: 592490000000000000000000000.000 -dec[c,4,8]: 1 -dec[a,4,8]: 592490000000000000000000.0 -dec[s,4,8]: 592490000000000000000000.0 -dec[m,4,8]: 0.0 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202 -dec[c,4,9]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,4,9]: -dec[m,4,9]: -35104440010000000000.000000000 -dec[d,4,9]: -10000000000000000000000000000.000000000 -dec[c,4,10]: 1 -dec[a,4,10]: 592490000000000000000000.003284 -dec[s,4,10]: 592489999999999999999999.996716 -dec[m,4,10]: 1945737160000000000000.000000 -dec[d,4,10]: -dec[c,4,11]: 1 -dec[a,4,11]: 592490000000000000000000.500001 -dec[s,4,11]: 592489999999999999999999.499999 -dec[m,4,11]: 296245592490000000000000.000000 -dec[d,4,11]: -dec[c,4,12]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,4,12]: -dec[m,4,12]: -296245059249000000000000.0000000 -dec[d,4,12]: -dec[c,4,13]: -1 -dec[a,4,13]: 1235160380123456789012345678.91 -dec[s,4,13]: -1233975400123456789012345678.91 -dec[m,4,13]: -dec[d,4,13]: 0.00047991690431925214 -dec[c,4,14]: 2147483647 -dec[a,4,14]: 1235160380123456789012345678.91 -dec[s,4,14]: -1233975400123456789012345678.91 -dec[m,4,14]: -dec[d,4,14]: 0.00047991690431925214 -dec[c,5,0]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,5,0]: -dec[m,5,0]: * -dec[d,5,0]: * -dec[c,5,1]: -1 -dec[a,5,1]: -328402 -dec[s,5,1]: -328398 -dec[m,5,1]: 656800 -dec[d,5,1]: 164200.00000000000 -dec[c,5,2]: -1 -dec[a,5,2]: -328399.206 -dec[s,5,2]: -328400.794 -dec[m,5,2]: -260749.600 -dec[d,5,2]: -413602.01511335013 -dec[c,5,3]: -1 -dec[a,5,3]: -328396.56 -dec[s,5,3]: -328403.44 -dec[m,5,3]: -1129696.00 -dec[d,5,3]: -95465.116279069767 -dec[c,5,4]: -1 -dec[a,5,4]: 592489999999999999671600 -dec[s,5,4]: -592490000000000000328400 -dec[m,5,4]: -194573716000000000000000000000 -dec[d,5,4]: -0.00000000000000000055427095815963139 -dec[c,5,5]: 0 -dec[a,5,5]: -656800 -dec[s,5,5]: 0 -dec[m,5,5]: 107846560000 -dec[d,5,5]: 1.00000000000000000 -dec[c,5,6]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,5,6]: -dec[m,5,6]: * -dec[d,5,6]: * -dec[c,5,7]: -1 -dec[a,5,7]: -328399.999 -dec[s,5,7]: -328400.001 -dec[m,5,7]: -328.400 -dec[d,5,7]: -328400000.00000000 -dec[c,5,8]: -1 -dec[a,5,8]: -328400.0 -dec[s,5,8]: -328400.0 -dec[m,5,8]: 0.0 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202 -dec[c,5,9]: -1 -dec[a,5,9]: -328400.000059249 -dec[s,5,9]: -328399.999940751 -dec[m,5,9]: 19.457371600 -dec[d,5,9]: 5542709581.596313862 -dec[c,5,10]: -1 -dec[a,5,10]: -328399.996716 -dec[s,5,10]: -328400.003284 -dec[m,5,10]: -1078.465600 -dec[d,5,10]: -100000000.000000000 -dec[c,5,11]: -1 -dec[a,5,11]: -328399.499999 -dec[s,5,11]: -328400.500001 -dec[m,5,11]: -164200.328400 -dec[d,5,11]: -656798.68640262719 -dec[c,5,12]: -1 -dec[a,5,12]: -328400.5000001 -dec[s,5,12]: -328399.4999999 -dec[m,5,12]: 164200.0328400 -dec[d,5,12]: 656799.86864002627 -dec[c,5,13]: -1 -dec[a,5,13]: 1234567890123456789012017278.91 -dec[s,5,13]: -1234567890123456789012674078.91 -dec[m,5,13]: -dec[d,5,13]: -0.00000000000000000000026600400239403602 -dec[c,5,14]: 2147483647 -dec[a,5,14]: 1234567890123456789012017278.91 -dec[s,5,14]: -1234567890123456789012674078.91 -dec[m,5,14]: -dec[d,5,14]: -0.00000000000000000000026600400239403602 -dec[c,6,0]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,6,0]: -dec[m,6,0]: * -dec[d,6,0]: * -dec[c,6,1]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,6,1]: -dec[m,6,1]: * -dec[d,6,1]: * -dec[c,6,2]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,6,2]: -dec[m,6,2]: * -dec[d,6,2]: * -dec[c,6,3]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,6,3]: -dec[m,6,3]: * -dec[d,6,3]: * -dec[c,6,4]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,6,4]: -dec[m,6,4]: * -dec[d,6,4]: * -dec[c,6,5]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,6,5]: -dec[m,6,5]: * -dec[d,6,5]: * -dec[c,6,6]: 0 -dec[a,6,6]: * -dec[s,6,6]: * -dec[m,6,6]: * -dec[d,6,6]: * -dec[c,6,7]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,6,7]: -dec[m,6,7]: * -dec[d,6,7]: * -dec[c,6,8]: 1 -dec[a,6,8]: * -dec[s,6,8]: * -dec[m,6,8]: * -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202 -dec[c,6,9]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,6,9]: -dec[m,6,9]: * -dec[d,6,9]: * -dec[c,6,10]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,6,10]: -dec[m,6,10]: * -dec[d,6,10]: * -dec[c,6,11]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,6,11]: -dec[m,6,11]: * -dec[d,6,11]: * -dec[c,6,12]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,6,12]: -dec[m,6,12]: * -dec[d,6,12]: * -dec[c,6,13]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,6,13]: -dec[m,6,13]: * -dec[d,6,13]: * -dec[c,6,14]: 2147483647 -dec[a,6,14]: -dec[s,6,14]: -dec[m,6,14]: * -dec[d,6,14]: * -dec[c,7,0]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,7,0]: -dec[m,7,0]: * -dec[d,7,0]: * -dec[c,7,1]: 1 -dec[a,7,1]: -1.999 -dec[s,7,1]: 2.001 -dec[m,7,1]: -0.002 -dec[d,7,1]: -0.00050000000000000000 -dec[c,7,2]: -1 -dec[a,7,2]: 0.795 -dec[s,7,2]: -0.793 -dec[m,7,2]: 0.000794 -dec[d,7,2]: 0.0012594458438287154 -dec[c,7,3]: -1 -dec[a,7,3]: 3.441 -dec[s,7,3]: -3.439 -dec[m,7,3]: 0.00344 -dec[d,7,3]: 0.00029069767441860465 -dec[c,7,4]: -1 -dec[a,7,4]: 592490000000000000000000.001 -dec[s,7,4]: -592489999999999999999999.999 -dec[m,7,4]: 592490000000000000000.000 -dec[d,7,4]: 0.0000000000000000000000000016877921990244561 -dec[c,7,5]: 1 -dec[a,7,5]: -328399.999 -dec[s,7,5]: 328400.001 -dec[m,7,5]: -328.400 -dec[d,7,5]: -0.0000000030450669914738124 -dec[c,7,6]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,7,6]: -dec[m,7,6]: * -dec[d,7,6]: * -dec[c,7,7]: 0 -dec[a,7,7]: 0.002 -dec[s,7,7]: 0.000 -dec[m,7,7]: 0.000001 -dec[d,7,7]: 1.00000000000000000 -dec[c,7,8]: 1 -dec[a,7,8]: 0.001 -dec[s,7,8]: 0.001 -dec[m,7,8]: 0.0000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202 -dec[c,7,9]: 1 -dec[a,7,9]: 0.000940751 -dec[s,7,9]: 0.001059249 -dec[m,7,9]: -0.000000059249 -dec[d,7,9]: -16.877921990244561 -dec[c,7,10]: -1 -dec[a,7,10]: 0.004284 -dec[s,7,10]: -0.002284 -dec[m,7,10]: 0.000003284 -dec[d,7,10]: 0.30450669914738124 -dec[c,7,11]: -1 -dec[a,7,11]: 0.501001 -dec[s,7,11]: -0.499001 -dec[m,7,11]: 0.000500001 -dec[d,7,11]: 0.0019999960000080000 -dec[c,7,12]: 1 -dec[a,7,12]: -0.4990001 -dec[s,7,12]: 0.5010001 -dec[m,7,12]: -0.0005000001 -dec[d,7,12]: -0.0019999996000000800 -dec[c,7,13]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,7,13]: -dec[m,7,13]: 1234567890123456789012345.67891 -dec[d,7,13]: 0.00000000000000000000000000000081000000729000007 -dec[c,7,14]: 2147483647 -dec[a,7,14]: -dec[s,7,14]: -dec[m,7,14]: 1234567890123456789012345.67891 -dec[d,7,14]: 0.00000000000000000000000000000081000000729000007 -dec[c,8,0]: -1 -dec[a,8,0]: * -dec[s,8,0]: * -dec[m,8,0]: 0.0 -dec[d,8,0]: 0 -dec[c,8,1]: 1 -dec[a,8,1]: -2.0 -dec[s,8,1]: 2.0 -dec[m,8,1]: 0.0 -dec[d,8,1]: 0 -dec[c,8,2]: -1 -dec[a,8,2]: 0.794 -dec[s,8,2]: -0.794 -dec[m,8,2]: 0.0000 -dec[d,8,2]: 0 -dec[c,8,3]: -1 -dec[a,8,3]: 3.44 -dec[s,8,3]: -3.44 -dec[m,8,3]: 0.000 -dec[d,8,3]: 0 -dec[c,8,4]: -1 -dec[a,8,4]: 592490000000000000000000.0 -dec[s,8,4]: -592490000000000000000000.0 -dec[m,8,4]: 0.0 -dec[d,8,4]: 0 -dec[c,8,5]: 1 -dec[a,8,5]: -328400.0 -dec[s,8,5]: 328400.0 -dec[m,8,5]: 0.0 -dec[d,8,5]: 0 -dec[c,8,6]: -1 -dec[a,8,6]: * -dec[s,8,6]: * -dec[m,8,6]: * -dec[d,8,6]: 0 -dec[c,8,7]: -1 -dec[a,8,7]: 0.001 -dec[s,8,7]: -0.001 -dec[m,8,7]: 0.0000 -dec[d,8,7]: 0 -dec[c,8,8]: 0 -dec[a,8,8]: 0.0 -dec[s,8,8]: 0.0 -dec[m,8,8]: 0.00 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202 -dec[c,8,9]: 1 -dec[a,8,9]: -0.000059249 -dec[s,8,9]: 0.000059249 -dec[m,8,9]: 0.0000000000 -dec[d,8,9]: 0 -dec[c,8,10]: -1 -dec[a,8,10]: 0.003284 -dec[s,8,10]: -0.003284 -dec[m,8,10]: 0.0000000 -dec[d,8,10]: 0 -dec[c,8,11]: -1 -dec[a,8,11]: 0.500001 -dec[s,8,11]: -0.500001 -dec[m,8,11]: 0.0000000 -dec[d,8,11]: 0 -dec[c,8,12]: 1 -dec[a,8,12]: -0.5000001 -dec[s,8,12]: 0.5000001 -dec[m,8,12]: 0.00000000 -dec[d,8,12]: 0 -dec[c,8,13]: -1 -dec[a,8,13]: 1234567890123456789012345678.91 -dec[s,8,13]: -1234567890123456789012345678.91 -dec[m,8,13]: 0.000 -dec[d,8,13]: 0 -dec[c,8,14]: 2147483647 -dec[a,8,14]: 1234567890123456789012345678.91 -dec[s,8,14]: -1234567890123456789012345678.91 -dec[m,8,14]: 0.000 -dec[d,8,14]: 0 -dec[c,9,0]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,9,0]: -dec[m,9,0]: * -dec[d,9,0]: * -dec[c,9,1]: 1 -dec[a,9,1]: -2.000059249 -dec[s,9,1]: 1.999940751 -dec[m,9,1]: 0.000118498 -dec[d,9,1]: 0.000029624500000000000 -dec[c,9,2]: -1 -dec[a,9,2]: 0.793940751 -dec[s,9,2]: -0.794059249 -dec[m,9,2]: -0.000047043706 -dec[d,9,2]: -0.000074620906801007557 -dec[c,9,3]: -1 -dec[a,9,3]: 3.439940751 -dec[s,9,3]: -3.440059249 -dec[m,9,3]: -0.00020381656 -dec[d,9,3]: -0.000017223546511627907 -dec[c,9,4]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,9,4]: -dec[m,9,4]: -35104440010000000000.000000000 -dec[d,9,4]: -0.000000000000000000000000000100000000000000000 -dec[c,9,5]: 1 -dec[a,9,5]: -328400.000059249 -dec[s,9,5]: 328399.999940751 -dec[m,9,5]: 19.457371600 -dec[d,9,5]: 0.00000000018041717417783191 -dec[c,9,6]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,9,6]: -dec[m,9,6]: * -dec[d,9,6]: * -dec[c,9,7]: -1 -dec[a,9,7]: 0.000940751 -dec[s,9,7]: -0.001059249 -dec[m,9,7]: -0.000000059249 -dec[d,9,7]: -0.059249000000000000 -dec[c,9,8]: -1 -dec[a,9,8]: -0.000059249 -dec[s,9,8]: -0.000059249 -dec[m,9,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202 -dec[c,9,9]: 0 -dec[a,9,9]: -0.000118498 -dec[s,9,9]: 0.000000000 -dec[m,9,9]: 0.000000003510444001 -dec[d,9,9]: 1.00000000000000000 -dec[c,9,10]: -1 -dec[a,9,10]: 0.003224751 -dec[s,9,10]: -0.003343249 -dec[m,9,10]: -0.000000194573716 -dec[d,9,10]: -0.018041717417783191 -dec[c,9,11]: -1 -dec[a,9,11]: 0.499941751 -dec[s,9,11]: -0.500060249 -dec[m,9,11]: -0.000029624559249 -dec[d,9,11]: -0.000118497763004473991 -dec[c,9,12]: 1 -dec[a,9,12]: -0.500059349 -dec[s,9,12]: 0.499940851 -dec[m,9,12]: 0.0000296245059249 -dec[d,9,12]: 0.000118497976300404740 -dec[c,9,13]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,9,13]: -dec[m,9,13]: -dec[d,9,13]: -0.000000000000000000000000000000047991690431925214 -dec[c,9,14]: 2147483647 -dec[a,9,14]: -dec[s,9,14]: -dec[m,9,14]: -dec[d,9,14]: -0.000000000000000000000000000000047991690431925214 -dec[c,10,0]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,10,0]: -dec[m,10,0]: * -dec[d,10,0]: * -dec[c,10,1]: 1 -dec[a,10,1]: -1.996716 -dec[s,10,1]: 2.003284 -dec[m,10,1]: -0.006568 -dec[d,10,1]: -0.0016420000000000000 -dec[c,10,2]: -1 -dec[a,10,2]: 0.797284 -dec[s,10,2]: -0.790716 -dec[m,10,2]: 0.002607496 -dec[d,10,2]: 0.0041360201511335013 -dec[c,10,3]: -1 -dec[a,10,3]: 3.443284 -dec[s,10,3]: -3.436716 -dec[m,10,3]: 0.01129696 -dec[d,10,3]: 0.00095465116279069767 -dec[c,10,4]: -1 -dec[a,10,4]: 592490000000000000000000.003284 -dec[s,10,4]: -592489999999999999999999.996716 -dec[m,10,4]: 1945737160000000000000.000000 -dec[d,10,4]: 0.0000000000000000000000000055427095815963139 -dec[c,10,5]: 1 -dec[a,10,5]: -328399.996716 -dec[s,10,5]: 328400.003284 -dec[m,10,5]: -1078.465600 -dec[d,10,5]: -0.0000000100000000000000000 -dec[c,10,6]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,10,6]: -dec[m,10,6]: * -dec[d,10,6]: * -dec[c,10,7]: 1 -dec[a,10,7]: 0.004284 -dec[s,10,7]: 0.002284 -dec[m,10,7]: 0.000003284 -dec[d,10,7]: 3.2840000000000000 -dec[c,10,8]: 1 -dec[a,10,8]: 0.003284 -dec[s,10,8]: 0.003284 -dec[m,10,8]: 0.0000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202 -dec[c,10,9]: 1 -dec[a,10,9]: 0.003224751 -dec[s,10,9]: 0.003343249 -dec[m,10,9]: -0.000000194573716 -dec[d,10,9]: -55.427095815963139 -dec[c,10,10]: 0 -dec[a,10,10]: 0.006568 -dec[s,10,10]: 0.000000 -dec[m,10,10]: 0.000010784656 -dec[d,10,10]: 1.00000000000000000 -dec[c,10,11]: -1 -dec[a,10,11]: 0.503285 -dec[s,10,11]: -0.496717 -dec[m,10,11]: 0.001642003284 -dec[d,10,11]: 0.0065679868640262719 -dec[c,10,12]: 1 -dec[a,10,12]: -0.4967161 -dec[s,10,12]: 0.5032841 -dec[m,10,12]: -0.0016420003284 -dec[d,10,12]: -0.0065679986864002627 -dec[c,10,13]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,10,13]: -dec[m,10,13]: -dec[d,10,13]: 0.0000000000000000000000000000026600400239403602 -dec[c,10,14]: 2147483647 -dec[a,10,14]: -dec[s,10,14]: -dec[m,10,14]: -dec[d,10,14]: 0.0000000000000000000000000000026600400239403602 -dec[c,11,0]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,11,0]: -dec[m,11,0]: * -dec[d,11,0]: * -dec[c,11,1]: 1 -dec[a,11,1]: -1.499999 -dec[s,11,1]: 2.500001 -dec[m,11,1]: -1.000002 -dec[d,11,1]: -0.25000050000000000 -dec[c,11,2]: -1 -dec[a,11,2]: 1.294001 -dec[s,11,2]: -0.293999 -dec[m,11,2]: 0.397000794 -dec[d,11,2]: 0.62972418136020151 -dec[c,11,3]: -1 -dec[a,11,3]: 3.940001 -dec[s,11,3]: -2.939999 -dec[m,11,3]: 1.72000344 -dec[d,11,3]: 0.14534912790697674 -dec[c,11,4]: -1 -dec[a,11,4]: 592490000000000000000000.500001 -dec[s,11,4]: -592489999999999999999999.499999 -dec[m,11,4]: 296245592490000000000000.000000 -dec[d,11,4]: 0.00000000000000000000000084389778730442708 -dec[c,11,5]: 1 -dec[a,11,5]: -328399.499999 -dec[s,11,5]: 328400.500001 -dec[m,11,5]: -164200.328400 -dec[d,11,5]: -0.0000015225365408038977 -dec[c,11,6]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,11,6]: -dec[m,11,6]: * -dec[d,11,6]: * -dec[c,11,7]: 1 -dec[a,11,7]: 0.501001 -dec[s,11,7]: 0.499001 -dec[m,11,7]: 0.000500001 -dec[d,11,7]: 500.00100000000000 -dec[c,11,8]: 1 -dec[a,11,8]: 0.500001 -dec[s,11,8]: 0.500001 -dec[m,11,8]: 0.0000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202 -dec[c,11,9]: 1 -dec[a,11,9]: 0.499941751 -dec[s,11,9]: 0.500060249 -dec[m,11,9]: -0.000029624559249 -dec[d,11,9]: -8438.9778730442708 -dec[c,11,10]: 1 -dec[a,11,10]: 0.503285 -dec[s,11,10]: 0.496717 -dec[m,11,10]: 0.001642003284 -dec[d,11,10]: 152.25365408038977 -dec[c,11,11]: 0 -dec[a,11,11]: 1.000002 -dec[s,11,11]: 0.000000 -dec[m,11,11]: 0.250001000001 -dec[d,11,11]: 1.00000000000000000 -dec[c,11,12]: 1 -dec[a,11,12]: 0.0000009 -dec[s,11,12]: 1.0000011 -dec[m,11,12]: -0.2500005500001 -dec[d,11,12]: -1.00000179999964000 -dec[c,11,13]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,11,13]: -dec[m,11,13]: -dec[d,11,13]: 0.00000000000000000000000000040500081364500732 -dec[c,11,14]: 2147483647 -dec[a,11,14]: -dec[s,11,14]: -dec[m,11,14]: -dec[d,11,14]: 0.00000000000000000000000000040500081364500732 -dec[c,12,0]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,12,0]: -dec[m,12,0]: * -dec[d,12,0]: * -dec[c,12,1]: 1 -dec[a,12,1]: -2.5000001 -dec[s,12,1]: 1.4999999 -dec[m,12,1]: 1.0000002 -dec[d,12,1]: 0.25000005000000000 -dec[c,12,2]: -1 -dec[a,12,2]: 0.2939999 -dec[s,12,2]: -1.2940001 -dec[m,12,2]: -0.3970000794 -dec[d,12,2]: -0.62972304785894207 -dec[c,12,3]: -1 -dec[a,12,3]: 2.9399999 -dec[s,12,3]: -3.9400001 -dec[m,12,3]: -1.720000344 -dec[d,12,3]: -0.14534886627906977 -dec[c,12,4]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,12,4]: -dec[m,12,4]: -296245059249000000000000.0000000 -dec[d,12,4]: -0.00000000000000000000000084389626829144796 -dec[c,12,5]: 1 -dec[a,12,5]: -328400.5000001 -dec[s,12,5]: 328399.4999999 -dec[m,12,5]: 164200.0328400 -dec[d,12,5]: 0.0000015225338002436054 -dec[c,12,6]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,12,6]: -dec[m,12,6]: * -dec[d,12,6]: * -dec[c,12,7]: -1 -dec[a,12,7]: -0.4990001 -dec[s,12,7]: -0.5010001 -dec[m,12,7]: -0.0005000001 -dec[d,12,7]: -500.00010000000000 -dec[c,12,8]: -1 -dec[a,12,8]: -0.5000001 -dec[s,12,8]: -0.5000001 -dec[m,12,8]: 0.00000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202 -dec[c,12,9]: -1 -dec[a,12,9]: -0.500059349 -dec[s,12,9]: -0.499940851 -dec[m,12,9]: 0.0000296245059249 -dec[d,12,9]: 8438.9626829144796 -dec[c,12,10]: -1 -dec[a,12,10]: -0.4967161 -dec[s,12,10]: -0.5032841 -dec[m,12,10]: -0.0016420003284 -dec[d,12,10]: -152.25338002436054 -dec[c,12,11]: -1 -dec[a,12,11]: 0.0000009 -dec[s,12,11]: -1.0000011 -dec[m,12,11]: -0.2500005500001 -dec[d,12,11]: -0.99999820000359999 -dec[c,12,12]: 0 -dec[a,12,12]: -1.0000002 -dec[s,12,12]: 0.0000000 -dec[m,12,12]: 0.25000010000001 -dec[d,12,12]: 1.00000000000000000 -dec[c,12,13]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,12,13]: -dec[m,12,13]: -dec[d,12,13]: -0.00000000000000000000000000040500008464500076 -dec[c,12,14]: 2147483647 -dec[a,12,14]: -dec[s,12,14]: -dec[m,12,14]: -dec[d,12,14]: -0.00000000000000000000000000040500008464500076 -dec[c,13,0]: -1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,13,0]: -dec[m,13,0]: * -dec[d,13,0]: * -dec[c,13,1]: 1 -dec[a,13,1]: 1234567890123456789012345676.91 -dec[s,13,1]: 1234567890123456789012345680.91 -dec[m,13,1]: -2469135780246913578024691357.82 -dec[d,13,1]: -617283945061728394506172839.46 -dec[c,13,2]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,13,2]: -dec[m,13,2]: -dec[d,13,2]: -dec[c,13,3]: 1 -dec[a,13,3]: 1234567890123456789012345682.35 -dec[s,13,3]: 1234567890123456789012345675.47 -dec[m,13,3]: -dec[d,13,3]: -dec[c,13,4]: 1 -dec[a,13,4]: 1235160380123456789012345678.91 -dec[s,13,4]: 1233975400123456789012345678.91 -dec[m,13,4]: -dec[d,13,4]: 2083.6940541164522 -dec[c,13,5]: 1 -dec[a,13,5]: 1234567890123456789012017278.91 -dec[s,13,5]: 1234567890123456789012674078.91 -dec[m,13,5]: -dec[d,13,5]: -3759341930948406787491.92 -dec[c,13,6]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,13,6]: -dec[m,13,6]: * -dec[d,13,6]: * -dec[c,13,7]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,13,7]: -dec[m,13,7]: 1234567890123456789012345.67891 -dec[d,13,7]: 1234567890123456789012345678910.000 -dec[c,13,8]: 1 -dec[a,13,8]: 1234567890123456789012345678.91 -dec[s,13,8]: 1234567890123456789012345678.91 -dec[m,13,8]: 0.000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202 -dec[c,13,9]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,13,9]: -dec[m,13,9]: -dec[d,13,9]: -dec[c,13,10]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,13,10]: -dec[m,13,10]: -dec[d,13,10]: -dec[c,13,11]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,13,11]: -dec[m,13,11]: -dec[d,13,11]: -dec[c,13,12]: 1 -(errno == PGTYPES_NUM_OVERFLOW) - r: -1200 -dec[s,13,12]: -dec[m,13,12]: -dec[d,13,12]: -dec[c,13,13]: 0 -dec[a,13,13]: 2469135780246913578024691357.82 -dec[s,13,13]: 0.00 -dec[m,13,13]: -dec[d,13,13]: 1.00000000000000000 -dec[c,13,14]: 2147483647 -dec[a,13,14]: 2469135780246913578024691357.82 -dec[s,13,14]: 0.00 -dec[m,13,14]: -dec[d,13,14]: 1.00000000000000000 -dec[c,14,0]: 2147483647 -dec[a,14,0]: 2469135780246913578024691357.82 -dec[s,14,0]: 0.00 -dec[m,14,0]: -dec[d,14,0]: 1.00000000000000000 -dec[c,14,1]: 2147483647 -dec[a,14,1]: 2469135780246913578024691357.82 -dec[s,14,1]: 0.00 -dec[m,14,1]: -dec[d,14,1]: 1.00000000000000000 -dec[c,14,2]: 2147483647 -dec[a,14,2]: 2469135780246913578024691357.82 -dec[s,14,2]: 0.00 -dec[m,14,2]: -dec[d,14,2]: 1.00000000000000000 -dec[c,14,3]: 2147483647 -dec[a,14,3]: 2469135780246913578024691357.82 -dec[s,14,3]: 0.00 -dec[m,14,3]: -dec[d,14,3]: 1.00000000000000000 -dec[c,14,4]: 2147483647 -dec[a,14,4]: 2469135780246913578024691357.82 -dec[s,14,4]: 0.00 -dec[m,14,4]: -dec[d,14,4]: 1.00000000000000000 -dec[c,14,5]: 2147483647 -dec[a,14,5]: 2469135780246913578024691357.82 -dec[s,14,5]: 0.00 -dec[m,14,5]: -dec[d,14,5]: 1.00000000000000000 -dec[c,14,6]: 2147483647 -dec[a,14,6]: 2469135780246913578024691357.82 -dec[s,14,6]: 0.00 -dec[m,14,6]: -dec[d,14,6]: 1.00000000000000000 -dec[c,14,7]: 2147483647 -dec[a,14,7]: 2469135780246913578024691357.82 -dec[s,14,7]: 0.00 -dec[m,14,7]: -dec[d,14,7]: 1.00000000000000000 -dec[c,14,8]: 2147483647 -dec[a,14,8]: 2469135780246913578024691357.82 -dec[s,14,8]: 0.00 -dec[m,14,8]: -dec[d,14,8]: 1.00000000000000000 -dec[c,14,9]: 2147483647 -dec[a,14,9]: 2469135780246913578024691357.82 -dec[s,14,9]: 0.00 -dec[m,14,9]: -dec[d,14,9]: 1.00000000000000000 -dec[c,14,10]: 2147483647 -dec[a,14,10]: 2469135780246913578024691357.82 -dec[s,14,10]: 0.00 -dec[m,14,10]: -dec[d,14,10]: 1.00000000000000000 -dec[c,14,11]: 2147483647 -dec[a,14,11]: 2469135780246913578024691357.82 -dec[s,14,11]: 0.00 -dec[m,14,11]: -dec[d,14,11]: 1.00000000000000000 -dec[c,14,12]: 2147483647 -dec[a,14,12]: 2469135780246913578024691357.82 -dec[s,14,12]: 0.00 -dec[m,14,12]: -dec[d,14,12]: 1.00000000000000000 -dec[c,14,13]: 2147483647 -dec[a,14,13]: 2469135780246913578024691357.82 -dec[s,14,13]: 0.00 -dec[m,14,13]: -dec[d,14,13]: 1.00000000000000000 -dec[c,14,14]: 2147483647 -dec[a,14,14]: 2469135780246913578024691357.82 -dec[s,14,14]: 0.00 -dec[m,14,14]: -dec[d,14,14]: 1.00000000000000000 -0: * -1: -2 -2: 0.794 -3: 3.44 -4: 592490000000000000000000 -5: -328400 -6: * -7: 0.001 -8: 0.0 -9: -0.000059249 -10: 0.003284 -11: 0.500001 -12: -0.5000001 -13: 1234567890123456789012345678.91 -14: diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test-MinGW32.stdout b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test-MinGW32.stdout deleted file mode 100644 index 185a00ea59..0000000000 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test-MinGW32.stdout +++ /dev/null @@ -1,6 +0,0 @@ -from int = 1407.0 -add = 2379.7 -sub = 2369.7 -mul = 13306998429.873000000 -div = 1330699.84298730000 1.330700e+006 -to long(0) = 20000000 14 diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2-MinGW32.stdout b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2-MinGW32.stdout deleted file mode 100644 index 2dad8a91a1..0000000000 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2-MinGW32.stdout +++ /dev/null @@ -1,1117 +0,0 @@ -endptr of 0 is not NULL -num[0,1]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -num[0,2]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -num[0,3]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0 -num[0,4]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.00 -num[0,5]: 0.00 -(errno == PGTYPES_NUM_OVERFLOW) - num[0,6]: 0 (r: -1) -(errno == PGTYPES_NUM_OVERFLOW) - num[0,8]: 0 (r: -1) -(errno == PGTYPES_NUM_OVERFLOW) - num[0,10]: 0 (r: -1) -num[0,11]: - (r: 0) -num[0,12]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.00 (r: 0 - cmp: 0) - -endptr of 1 is not NULL -num[1,1]: -2 -num[1,2]: -2 -num[1,3]: -2.0 -num[1,4]: -2.00 -num[1,5]: 0.00 -num[1,6]: -2 (r: 0) -num[1,7]: -2.00 (r: 0 - cmp: 0) -num[1,8]: -2 (r: 0) -num[1,9]: -2.00 (r: 0 - cmp: 0) -num[1,10]: -2 (r: 0) -num[1,11]: - (r: 0) -num[1,12]: -2.00 (r: 0 - cmp: 0) - -endptr of 2 is not NULL -num[2,1]: 0.794 -num[2,2]: 1 -num[2,3]: 0.8 -num[2,4]: 0.79 -num[2,5]: 0.00 -num[2,6]: 1 (r: 0) -num[2,7]: 1.00 (r: 0 - cmp: -1) -num[2,8]: 1 (r: 0) -num[2,9]: 1.00 (r: 0 - cmp: -1) -num[2,10]: 0.794 (r: 0) -num[2,11]: - (r: 0) -num[2,12]: 0.79 (r: 0 - cmp: 0) - -endptr of 3 is not NULL -num[3,1]: 3.44 -num[3,2]: 3 -num[3,3]: 3.4 -num[3,4]: 3.44 -num[3,5]: 0.00 -num[3,6]: 3 (r: 0) -num[3,7]: 3.00 (r: 0 - cmp: 1) -num[3,8]: 3 (r: 0) -num[3,9]: 3.00 (r: 0 - cmp: 1) -num[3,10]: 3.44 (r: 0) -num[3,11]: - (r: 0) -num[3,12]: 3.44 (r: 0 - cmp: 0) - -endptr of 4 is not NULL -num[4,1]: 592490000000000000000000 -num[4,2]: 592490000000000000000000 -num[4,3]: 592490000000000000000000.0 -num[4,4]: 592490000000000000000000.00 -num[4,5]: 0.00 -(errno == PGTYPES_NUM_OVERFLOW) - num[4,6]: 0 (r: -1) -(errno == PGTYPES_NUM_OVERFLOW) - num[4,8]: 0 (r: -1) -num[4,10]: 5.9249e+023 (r: 0) -num[4,11]: - (r: 0) -num[4,12]: 592490000000000000000000.00 (r: 0 - cmp: 0) - -endptr of 5 is not NULL -num[5,1]: -328400 -num[5,2]: -328400 -num[5,3]: -328400.0 -num[5,4]: -328400.00 -num[5,5]: 0.00 -num[5,6]: -328400 (r: 0) -num[5,7]: -328400.00 (r: 0 - cmp: 0) -num[5,8]: -328400 (r: 0) -num[5,9]: -328400.00 (r: 0 - cmp: 0) -num[5,10]: -328400 (r: 0) -num[5,11]: - (r: 0) -num[5,12]: -328400.00 (r: 0 - cmp: 0) - -endptr of 6 is not NULL -num[6,1]: 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002 -num[6,2]: 0 -num[6,3]: 0.0 -num[6,4]: 0.00 -num[6,5]: 0.00 -num[6,6]: 0 (r: 0) -num[6,7]: 0.00 (r: 0 - cmp: 1) -num[6,8]: 0 (r: 0) -num[6,9]: 0.00 (r: 0 - cmp: 1) -num[6,11]: - (r: 0) -num[6,12]: 0.00 (r: 0 - cmp: 0) - -endptr of 7 is not NULL -num[7,1]: 0.001 -num[7,2]: 0 -num[7,3]: 0.0 -num[7,4]: 0.00 -num[7,5]: 0.00 -num[7,6]: 0 (r: 0) -num[7,7]: 0.00 (r: 0 - cmp: 1) -num[7,8]: 0 (r: 0) -num[7,9]: 0.00 (r: 0 - cmp: 1) -num[7,10]: 0.001 (r: 0) -num[7,11]: - (r: 0) -num[7,12]: 0.00 (r: 0 - cmp: 0) - -endptr of 8 is not NULL -num[8,1]: 0.0 -num[8,2]: 0 -num[8,3]: 0.0 -num[8,4]: 0.00 -num[8,5]: 0.00 -num[8,6]: 0 (r: 0) -num[8,7]: 0.00 (r: 0 - cmp: 0) -num[8,8]: 0 (r: 0) -num[8,9]: 0.00 (r: 0 - cmp: 0) -num[8,10]: 0 (r: 0) -num[8,11]: - (r: 0) -num[8,12]: 0.00 (r: 0 - cmp: 0) - -endptr of 9 is not NULL -num[9,1]: -0.000059249 -num[9,2]: -0 -num[9,3]: -0.0 -num[9,4]: -0.00 -num[9,5]: 0.00 -num[9,6]: 0 (r: 0) -num[9,7]: 0.00 (r: 0 - cmp: -1) -num[9,8]: 0 (r: 0) -num[9,9]: 0.00 (r: 0 - cmp: -1) -num[9,10]: -5.9249e-005 (r: 0) -num[9,11]: - (r: 0) -num[9,12]: -0.00 (r: 0 - cmp: 0) - -endptr of 10 is not NULL -num[10,1]: 0.003284 -num[10,2]: 0 -num[10,3]: 0.0 -num[10,4]: 0.00 -num[10,5]: 0.00 -num[10,6]: 0 (r: 0) -num[10,7]: 0.00 (r: 0 - cmp: 1) -num[10,8]: 0 (r: 0) -num[10,9]: 0.00 (r: 0 - cmp: 1) -num[10,10]: 0.003284 (r: 0) -num[10,11]: - (r: 0) -num[10,12]: 0.00 (r: 0 - cmp: 0) - -endptr of 11 is not NULL -num[11,1]: 0.500001 -num[11,2]: 1 -num[11,3]: 0.5 -num[11,4]: 0.50 -num[11,5]: 0.00 -num[11,6]: 1 (r: 0) -num[11,7]: 1.00 (r: 0 - cmp: -1) -num[11,8]: 1 (r: 0) -num[11,9]: 1.00 (r: 0 - cmp: -1) -num[11,10]: 0.500001 (r: 0) -num[11,11]: - (r: 0) -num[11,12]: 0.50 (r: 0 - cmp: 0) - -endptr of 12 is not NULL -num[12,1]: -0.5000001 -num[12,2]: -1 -num[12,3]: -0.5 -num[12,4]: -0.50 -num[12,5]: 0.00 -num[12,6]: -1 (r: 0) -num[12,7]: -1.00 (r: 0 - cmp: 1) -num[12,8]: -1 (r: 0) -num[12,9]: -1.00 (r: 0 - cmp: 1) -num[12,10]: -0.5 (r: 0) -num[12,11]: - (r: 0) -num[12,12]: -0.50 (r: 0 - cmp: 0) - -endptr of 13 is not NULL -num[13,1]: 1234567890123456789012345678.91 -num[13,2]: 1234567890123456789012345679 -num[13,3]: 1234567890123456789012345678.9 -num[13,4]: 1234567890123456789012345678.91 -num[13,5]: 0.00 -(errno == PGTYPES_NUM_OVERFLOW) - num[13,6]: 0 (r: -1) -(errno == PGTYPES_NUM_OVERFLOW) - num[13,8]: 0 (r: -1) -num[13,10]: 1.23457e+027 (r: 0) -num[13,11]: - (r: 0) -num[13,12]: 1234567890123456789012345678.91 (r: 0 - cmp: 0) - -endptr of 14 is not NULL -num[14,1]: 1234567890123456789012345678.921 -num[14,2]: 1234567890123456789012345679 -num[14,3]: 1234567890123456789012345678.9 -num[14,4]: 1234567890123456789012345678.92 -num[14,5]: 0.00 -(errno == PGTYPES_NUM_OVERFLOW) - num[14,6]: 0 (r: -1) -(errno == PGTYPES_NUM_OVERFLOW) - num[14,8]: 0 (r: -1) -num[14,10]: 1.23457e+027 (r: 0) -(errno == PGTYPES_NUM_OVERFLOW) - num[14,11]: - (r: -1) - -(errno == PGTYPES_NUM_BAD_NUMERIC) - endptr of 15 is not NULL -*endptr of 15 is not \0 -num[a,0,0]: 40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[s,0,0]: 0.0000000000 -num[m,0,0]: 400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,0,0]: 1.0000000000 -num[a,0,1]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998.0000000000 -num[s,0,1]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002.0000000000 -num[m,0,1]: -40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,0,1]: -10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,0,2]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.7940000000 -num[s,0,2]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.2060000000 -num[m,0,2]: 15880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,0,2]: 25188916876574307304785894206549118387909319899244332493702770780856423173803526448362720403022670025188916876574307304785894206549118387909319899244332493702770780856423173803526448362720403022670025188916876574307304785894206549118387909319899244332493702770780856423173803526448362720403022670025188916876574307304785894206549118387909319899244332493702770780856423173803526448362720403022670.0251889000 -num[a,0,3]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003.4400000000 -num[s,0,3]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999996.5600000000 -num[m,0,3]: 68800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,0,3]: 5813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093.0232560000 -num[a,0,4]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000592490000000000000000000.0000000000 -num[s,0,4]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999407510000000000000000000.0000000000 -num[m,0,4]: 11849800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,0,4]: 33755843980489122179277287380377727894141673277186112845786426775135445323971712602744350115613765633175243464024709277793718037435230974362436496818511704838900234603115664399399145977147293625208864284629276443484278215666087191345001603402589073233303515671150567942074971729480666340360174855271818933652888656348630356630491653867575824064541173690695201606778173471.2822000000 -num[a,0,5]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999671600.0000000000 -num[s,0,5]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000328400.0000000000 -num[m,0,5]: -6568000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,0,5]: -60901339829476248477466504263093788063337393422655298416565164433617539585870889159561510353227771010962241169305724725943970767356881851400730816077953714981729598051157125456760048721071863580998781973203410475030450669914738124238733252131546894031668696711327649208282582216808769792935444579780755176613885505481120584652862362971985383678440925700365408038976857490864799025578562728.3800000000 -num[a,0,6]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[s,0,6]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[m,0,6]: 4.0000000000 -num[d,0,6]: 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,0,7]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0010000000 -num[s,0,7]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9990000000 -num[m,0,7]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,0,7]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,0,8]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[s,0,8]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[m,0,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,0,9]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9999407510 -num[s,0,9]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000592490 -num[m,0,9]: -1184980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,0,9]: -337558439804891221792772873803777278941416732771861128457864267751354453239717126027443501156137656331752434640247092777937180374352309743624364968185117048389002346031156643993991459771472936252088642846292764434842782156660871913450016034025890732333035156711505679420749717294806663403601748552718189336528886563486303566304916538675758240645411736906952016067781734712822157335988793059798477611.4364799406 -num[a,0,10]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0032840000 -num[s,0,10]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9967160000 -num[m,0,10]: 65680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,0,10]: 6090133982947624847746650426309378806333739342265529841656516443361753958587088915956151035322777101096224116930572472594397076735688185140073081607795371498172959805115712545676004872107186358099878197320341047503045066991473812423873325213154689403166869671132764920828258221680876979293544457978075517661388550548112058465286236297198538367844092570036540803897685749086479902557856272838002436.0535931790 -num[a,0,11]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.5000010000 -num[s,0,11]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.4999990000 -num[m,0,11]: 10000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,0,11]: 39999920000159999680000639998720002559994880010239979520040959918080163839672320655358689282621434757130485739028521942956114087771824456351087297825404349191301617396765206469587060825878348243303513392973214053571892856214287571424857150285699428601142797714404571190857618284763430473139053721892556214887570224859550280899438201123597752804494391011217977564044871910256179487641024717950564.0988718023 -num[a,0,12]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.4999999000 -num[s,0,12]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.5000001000 -num[m,0,12]: -10000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,0,12]: -39999992000001599999680000063999987200002559999488000102399979520004095999180800163839967232006553598689280262143947571210485757902848419430316113936777212644557471088505782298843540231291953741609251678149664370067125986574802685039462992107401578519684296063140787371842525631494873701025259794948041010391797921640415671916865616626876674624665075066984986603002679399464120107175978564804287.0391425922 -num[a,0,13]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001234567890123456789012345678.9100000000 -num[s,0,13]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998765432109876543210987654321.0900000000 -num[m,0,13]: 24691357802469135780246913578200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,0,13]: 16200000145800001326780012073583089868436639792144602011794432069173427871944627216535488452104037734402488812766825268543092076559937753306592463425498481952238394402210698594884666469792189859469175471551488967831431174229215285702844063565115973562205366453218447154498968406694142978268167639546201917272112583939026078314516169317627127550253962230423465305471042.6305370000 -num[a,0,14]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001234567890123456789012345678.9210000000 -num[s,0,14]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998765432109876543210987654321.0790000000 -num[m,0,14]: 24691357802469135780246913578420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,0,14]: 16200000145800001326780012073438747865838483756809679983855488190421495112429743605252505619668606245113387993074870449075163411519793685453399903975484793505772589916586682299621591493014451434717743879521702761509433606809200816287108380036339147553262638409152127519194255768451119299228069799803818551847328103399274511743550433402484767562070619244777160576307850.4589877000 -num[a,1,0]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998.0000000000 -num[s,1,0]: -20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002.0000000000 -num[m,1,0]: -40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,1,0]: -0.0000000000 -num[a,1,1]: -4.0000000000 -num[s,1,1]: 0.0000000000 -num[m,1,1]: 4.0000000000 -num[d,1,1]: 1.0000000000 -num[a,1,2]: -1.2060000000 -num[s,1,2]: -2.7940000000 -num[m,1,2]: -1.5880000000 -num[d,1,2]: -2.5188916877 -num[a,1,3]: 1.4400000000 -num[s,1,3]: -5.4400000000 -num[m,1,3]: -6.8800000000 -num[d,1,3]: -0.5813953488 -num[a,1,4]: 592489999999999999999998.0000000000 -num[s,1,4]: -592490000000000000000002.0000000000 -num[m,1,4]: -1184980000000000000000000.0000000000 -num[d,1,4]: -0.0000000000 -num[a,1,5]: -328402.0000000000 -num[s,1,5]: 328398.0000000000 -num[m,1,5]: 656800.0000000000 -num[d,1,5]: 0.0000060901 -num[a,1,6]: -2.0000000000 -num[s,1,6]: -2.0000000000 -num[m,1,6]: -0.0000000000 -num[d,1,6]: -10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,1,7]: -1.9990000000 -num[s,1,7]: -2.0010000000 -num[m,1,7]: -0.0020000000 -num[d,1,7]: -2000.0000000000 -num[a,1,8]: -2.0000000000 -num[s,1,8]: -2.0000000000 -num[m,1,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,1,9]: -2.0000592490 -num[s,1,9]: -1.9999407510 -num[m,1,9]: 0.0001184980 -num[d,1,9]: 33755.8439804891 -num[a,1,10]: -1.9967160000 -num[s,1,10]: -2.0032840000 -num[m,1,10]: -0.0065680000 -num[d,1,10]: -609.0133982948 -num[a,1,11]: -1.4999990000 -num[s,1,11]: -2.5000010000 -num[m,1,11]: -1.0000020000 -num[d,1,11]: -3.9999920000 -num[a,1,12]: -2.5000001000 -num[s,1,12]: -1.4999999000 -num[m,1,12]: 1.0000002000 -num[d,1,12]: 3.9999992000 -num[a,1,13]: 1234567890123456789012345676.9100000000 -num[s,1,13]: -1234567890123456789012345680.9100000000 -num[m,1,13]: -2469135780246913578024691357.8200000000 -num[d,1,13]: -0.0000000000 -num[a,1,14]: 1234567890123456789012345676.9210000000 -num[s,1,14]: -1234567890123456789012345680.9210000000 -num[m,1,14]: -2469135780246913578024691357.8420000000 -num[d,1,14]: -0.0000000000 -num[a,2,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.7940000000 -num[s,2,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.2060000000 -num[m,2,0]: 15880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,2,0]: 0.0000000000 -num[a,2,1]: -1.2060000000 -num[s,2,1]: 2.7940000000 -num[m,2,1]: -1.5880000000 -num[d,2,1]: -0.3970000000 -num[a,2,2]: 1.5880000000 -num[s,2,2]: 0.0000000000 -num[m,2,2]: 0.6304360000 -num[d,2,2]: 1.0000000000 -num[a,2,3]: 4.2340000000 -num[s,2,3]: -2.6460000000 -num[m,2,3]: 2.7313600000 -num[d,2,3]: 0.2308139535 -num[a,2,4]: 592490000000000000000000.7940000000 -num[s,2,4]: -592489999999999999999999.2060000000 -num[m,2,4]: 470437060000000000000000.0000000000 -num[d,2,4]: 0.0000000000 -num[a,2,5]: -328399.2060000000 -num[s,2,5]: 328400.7940000000 -num[m,2,5]: -260749.6000000000 -num[d,2,5]: -0.0000024178 -num[a,2,6]: 0.7940000000 -num[s,2,6]: 0.7940000000 -num[m,2,6]: 0.0000000000 -num[d,2,6]: 3970000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,2,7]: 0.7950000000 -num[s,2,7]: 0.7930000000 -num[m,2,7]: 0.0007940000 -num[d,2,7]: 794.0000000000 -num[a,2,8]: 0.7940000000 -num[s,2,8]: 0.7940000000 -num[m,2,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,2,9]: 0.7939407510 -num[s,2,9]: 0.7940592490 -num[m,2,9]: -0.0000470437 -num[d,2,9]: -13401.0700602542 -num[a,2,10]: 0.7972840000 -num[s,2,10]: 0.7907160000 -num[m,2,10]: 0.0026074960 -num[d,2,10]: 241.7783191230 -num[a,2,11]: 1.2940010000 -num[s,2,11]: 0.2939990000 -num[m,2,11]: 0.3970007940 -num[d,2,11]: 1.5879968240 -num[a,2,12]: 0.2939999000 -num[s,2,12]: 1.2940001000 -num[m,2,12]: -0.3970000794 -num[d,2,12]: -1.5879996824 -num[a,2,13]: 1234567890123456789012345679.7040000000 -num[s,2,13]: -1234567890123456789012345678.1160000000 -num[m,2,13]: 980246904758024690475802469.0545400000 -num[d,2,13]: 0.0000000000 -num[a,2,14]: 1234567890123456789012345679.7150000000 -num[s,2,14]: -1234567890123456789012345678.1270000000 -num[m,2,14]: 980246904758024690475802469.0632740000 -num[d,2,14]: 0.0000000000 -num[a,3,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003.4400000000 -num[s,3,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999996.5600000000 -num[m,3,0]: 68800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,3,0]: 0.0000000000 -num[a,3,1]: 1.4400000000 -num[s,3,1]: 5.4400000000 -num[m,3,1]: -6.8800000000 -num[d,3,1]: -1.7200000000 -num[a,3,2]: 4.2340000000 -num[s,3,2]: 2.6460000000 -num[m,3,2]: 2.7313600000 -num[d,3,2]: 4.3324937028 -num[a,3,3]: 6.8800000000 -num[s,3,3]: 0.0000000000 -num[m,3,3]: 11.8336000000 -num[d,3,3]: 1.0000000000 -num[a,3,4]: 592490000000000000000003.4400000000 -num[s,3,4]: -592489999999999999999996.5600000000 -num[m,3,4]: 2038165600000000000000000.0000000000 -num[d,3,4]: 0.0000000000 -num[a,3,5]: -328396.5600000000 -num[s,3,5]: 328403.4400000000 -num[m,3,5]: -1129696.0000000000 -num[d,3,5]: -0.0000104750 -num[a,3,6]: 3.4400000000 -num[s,3,6]: 3.4400000000 -num[m,3,6]: 0.0000000000 -num[d,3,6]: 17200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,3,7]: 3.4410000000 -num[s,3,7]: 3.4390000000 -num[m,3,7]: 0.0034400000 -num[d,3,7]: 3440.0000000000 -num[a,3,8]: 3.4400000000 -num[s,3,8]: 3.4400000000 -num[m,3,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,3,9]: 3.4399407510 -num[s,3,9]: 3.4400592490 -num[m,3,9]: -0.0002038166 -num[d,3,9]: -58060.0516464413 -num[a,3,10]: 3.4432840000 -num[s,3,10]: 3.4367160000 -num[m,3,10]: 0.0112969600 -num[d,3,10]: 1047.5030450670 -num[a,3,11]: 3.9400010000 -num[s,3,11]: 2.9399990000 -num[m,3,11]: 1.7200034400 -num[d,3,11]: 6.8799862400 -num[a,3,12]: 2.9399999000 -num[s,3,12]: 3.9400001000 -num[m,3,12]: -1.7200003440 -num[d,3,12]: -6.8799986240 -num[a,3,13]: 1234567890123456789012345682.3500000000 -num[s,3,13]: -1234567890123456789012345675.4700000000 -num[m,3,13]: 4246913542024691354202469135.4504000000 -num[d,3,13]: 0.0000000000 -num[a,3,14]: 1234567890123456789012345682.3610000000 -num[s,3,14]: -1234567890123456789012345675.4810000000 -num[m,3,14]: 4246913542024691354202469135.4882400000 -num[d,3,14]: 0.0000000000 -num[a,4,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000592490000000000000000000.0000000000 -num[s,4,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999407510000000000000000000.0000000000 -num[m,4,0]: 11849800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,4,0]: 0.0000000000 -num[a,4,1]: 592489999999999999999998.0000000000 -num[s,4,1]: 592490000000000000000002.0000000000 -num[m,4,1]: -1184980000000000000000000.0000000000 -num[d,4,1]: -296245000000000000000000.0000000000 -num[a,4,2]: 592490000000000000000000.7940000000 -num[s,4,2]: 592489999999999999999999.2060000000 -num[m,4,2]: 470437060000000000000000.0000000000 -num[d,4,2]: 746209068010075566750629.7229219000 -num[a,4,3]: 592490000000000000000003.4400000000 -num[s,4,3]: 592489999999999999999996.5600000000 -num[m,4,3]: 2038165600000000000000000.0000000000 -num[d,4,3]: 172235465116279069767441.8604650000 -num[a,4,4]: 1184980000000000000000000.0000000000 -num[s,4,4]: 0.0000000000 -num[m,4,4]: 351044400100000000000000000000000000000000000000.0000000000 -num[d,4,4]: 1.0000000000 -num[a,4,5]: 592489999999999999671600.0000000000 -num[s,4,5]: 592490000000000000328400.0000000000 -num[m,4,5]: -194573716000000000000000000000.0000000000 -num[d,4,5]: -1804171741778319123.0207000000 -num[a,4,6]: 592490000000000000000000.0000000000 -num[s,4,6]: 592490000000000000000000.0000000000 -num[m,4,6]: 0.0000000000 -num[d,4,6]: 2962450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,4,7]: 592490000000000000000000.0010000000 -num[s,4,7]: 592489999999999999999999.9990000000 -num[m,4,7]: 592490000000000000000.0000000000 -num[d,4,7]: 592490000000000000000000000.0000000000 -num[a,4,8]: 592490000000000000000000.0000000000 -num[s,4,8]: 592490000000000000000000.0000000000 -num[m,4,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,4,9]: 592489999999999999999999.9999407510 -num[s,4,9]: 592490000000000000000000.0000592490 -num[m,4,9]: -35104440010000000000.0000000000 -num[d,4,9]: -10000000000000000000000000000.0000000000 -num[a,4,10]: 592490000000000000000000.0032840000 -num[s,4,10]: 592489999999999999999999.9967160000 -num[m,4,10]: 1945737160000000000000.0000000000 -num[d,4,10]: 180417174177831912302070645.5542021924 -num[a,4,11]: 592490000000000000000000.5000010000 -num[s,4,11]: 592489999999999999999999.4999990000 -num[m,4,11]: 296245592490000000000000.0000000000 -num[d,4,11]: 1184977630044739910520178.9596420807 -num[a,4,12]: 592489999999999999999999.4999999000 -num[s,4,12]: 592490000000000000000000.5000001000 -num[m,4,12]: -296245059249000000000000.0000000000 -num[d,4,12]: -1184979763004047399190520.1618959676 -num[a,4,13]: 1235160380123456789012345678.9100000000 -num[s,4,13]: -1233975400123456789012345678.9100000000 -num[m,4,13]: 731469129219246912921924691297385900000000000000000.0000000000 -num[d,4,13]: 0.0004799169 -num[a,4,14]: 1235160380123456789012345678.9210000000 -num[s,4,14]: -1233975400123456789012345678.9210000000 -num[m,4,14]: 731469129219246912921924691303903290000000000000000.0000000000 -num[d,4,14]: 0.0004799169 -num[a,5,0]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999671600.0000000000 -num[s,5,0]: -20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000328400.0000000000 -num[m,5,0]: -6568000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,5,0]: -0.0000000000 -num[a,5,1]: -328402.0000000000 -num[s,5,1]: -328398.0000000000 -num[m,5,1]: 656800.0000000000 -num[d,5,1]: 164200.0000000000 -num[a,5,2]: -328399.2060000000 -num[s,5,2]: -328400.7940000000 -num[m,5,2]: -260749.6000000000 -num[d,5,2]: -413602.0151133501 -num[a,5,3]: -328396.5600000000 -num[s,5,3]: -328403.4400000000 -num[m,5,3]: -1129696.0000000000 -num[d,5,3]: -95465.1162790698 -num[a,5,4]: 592489999999999999671600.0000000000 -num[s,5,4]: -592490000000000000328400.0000000000 -num[m,5,4]: -194573716000000000000000000000.0000000000 -num[d,5,4]: -0.0000000000 -num[a,5,5]: -656800.0000000000 -num[s,5,5]: 0.0000000000 -num[m,5,5]: 107846560000.0000000000 -num[d,5,5]: 1.0000000000 -num[a,5,6]: -328400.0000000000 -num[s,5,6]: -328400.0000000000 -num[m,5,6]: -0.0000000000 -num[d,5,6]: -1642000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,5,7]: -328399.9990000000 -num[s,5,7]: -328400.0010000000 -num[m,5,7]: -328.4000000000 -num[d,5,7]: -328400000.0000000000 -num[a,5,8]: -328400.0000000000 -num[s,5,8]: -328400.0000000000 -num[m,5,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,5,9]: -328400.0000592490 -num[s,5,9]: -328399.9999407510 -num[m,5,9]: 19.4573716000 -num[d,5,9]: 5542709581.5963138618 -num[a,5,10]: -328399.9967160000 -num[s,5,10]: -328400.0032840000 -num[m,5,10]: -1078.4656000000 -num[d,5,10]: -100000000.0000000000 -num[a,5,11]: -328399.4999990000 -num[s,5,11]: -328400.5000010000 -num[m,5,11]: -164200.3284000000 -num[d,5,11]: -656798.6864026272 -num[a,5,12]: -328400.5000001000 -num[s,5,12]: -328399.4999999000 -num[m,5,12]: 164200.0328400000 -num[d,5,12]: 656799.8686400263 -num[a,5,13]: 1234567890123456789012017278.9100000000 -num[s,5,13]: -1234567890123456789012674078.9100000000 -num[m,5,13]: -405432095116543209511654320954044.0000000000 -num[d,5,13]: -0.0000000000 -num[a,5,14]: 1234567890123456789012017278.9210000000 -num[s,5,14]: -1234567890123456789012674078.9210000000 -num[m,5,14]: -405432095116543209511654320957656.4000000000 -num[d,5,14]: -0.0000000000 -num[a,6,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[s,6,0]: -20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[m,6,0]: 4.0000000000 -num[d,6,0]: 0.0000000000 -num[a,6,1]: -2.0000000000 -num[s,6,1]: 2.0000000000 -num[m,6,1]: -0.0000000000 -num[d,6,1]: -0.0000000000 -num[a,6,2]: 0.7940000000 -num[s,6,2]: -0.7940000000 -num[m,6,2]: 0.0000000000 -num[d,6,2]: 0.0000000000 -num[a,6,3]: 3.4400000000 -num[s,6,3]: -3.4400000000 -num[m,6,3]: 0.0000000000 -num[d,6,3]: 0.0000000000 -num[a,6,4]: 592490000000000000000000.0000000000 -num[s,6,4]: -592490000000000000000000.0000000000 -num[m,6,4]: 0.0000000000 -num[d,6,4]: 0.0000000000 -num[a,6,5]: -328400.0000000000 -num[s,6,5]: 328400.0000000000 -num[m,6,5]: -0.0000000000 -num[d,6,5]: -0.0000000000 -num[a,6,6]: 0.0000000000 -num[s,6,6]: 0.0000000000 -num[m,6,6]: 0.0000000000 -num[d,6,6]: 1.0000000000 -num[a,6,7]: 0.0010000000 -num[s,6,7]: -0.0010000000 -num[m,6,7]: 0.0000000000 -num[d,6,7]: 0.0000000000 -num[a,6,8]: 0.0000000000 -num[s,6,8]: 0.0000000000 -num[m,6,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,6,9]: -0.0000592490 -num[s,6,9]: 0.0000592490 -num[m,6,9]: -0.0000000000 -num[d,6,9]: -0.0000000000 -num[a,6,10]: 0.0032840000 -num[s,6,10]: -0.0032840000 -num[m,6,10]: 0.0000000000 -num[d,6,10]: 0.0000000000 -num[a,6,11]: 0.5000010000 -num[s,6,11]: -0.5000010000 -num[m,6,11]: 0.0000000000 -num[d,6,11]: 0.0000000000 -num[a,6,12]: -0.5000001000 -num[s,6,12]: 0.5000001000 -num[m,6,12]: -0.0000000000 -num[d,6,12]: -0.0000000000 -num[a,6,13]: 1234567890123456789012345678.9100000000 -num[s,6,13]: -1234567890123456789012345678.9100000000 -num[m,6,13]: 0.0000000000 -num[d,6,13]: 0.0000000000 -num[a,6,14]: 1234567890123456789012345678.9210000000 -num[s,6,14]: -1234567890123456789012345678.9210000000 -num[m,6,14]: 0.0000000000 -num[d,6,14]: 0.0000000000 -num[a,7,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0010000000 -num[s,7,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9990000000 -num[m,7,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,7,0]: 0.0000000000 -num[a,7,1]: -1.9990000000 -num[s,7,1]: 2.0010000000 -num[m,7,1]: -0.0020000000 -num[d,7,1]: -0.0005000000 -num[a,7,2]: 0.7950000000 -num[s,7,2]: -0.7930000000 -num[m,7,2]: 0.0007940000 -num[d,7,2]: 0.0012594458 -num[a,7,3]: 3.4410000000 -num[s,7,3]: -3.4390000000 -num[m,7,3]: 0.0034400000 -num[d,7,3]: 0.0002906977 -num[a,7,4]: 592490000000000000000000.0010000000 -num[s,7,4]: -592489999999999999999999.9990000000 -num[m,7,4]: 592490000000000000000.0000000000 -num[d,7,4]: 0.0000000000 -num[a,7,5]: -328399.9990000000 -num[s,7,5]: 328400.0010000000 -num[m,7,5]: -328.4000000000 -num[d,7,5]: -0.0000000030 -num[a,7,6]: 0.0010000000 -num[s,7,6]: 0.0010000000 -num[m,7,6]: 0.0000000000 -num[d,7,6]: 5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,7,7]: 0.0020000000 -num[s,7,7]: 0.0000000000 -num[m,7,7]: 0.0000010000 -num[d,7,7]: 1.0000000000 -num[a,7,8]: 0.0010000000 -num[s,7,8]: 0.0010000000 -num[m,7,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,7,9]: 0.0009407510 -num[s,7,9]: 0.0010592490 -num[m,7,9]: -0.0000000592 -num[d,7,9]: -16.8779219902 -num[a,7,10]: 0.0042840000 -num[s,7,10]: -0.0022840000 -num[m,7,10]: 0.0000032840 -num[d,7,10]: 0.3045066991 -num[a,7,11]: 0.5010010000 -num[s,7,11]: -0.4990010000 -num[m,7,11]: 0.0005000010 -num[d,7,11]: 0.0019999960 -num[a,7,12]: -0.4990001000 -num[s,7,12]: 0.5010001000 -num[m,7,12]: -0.0005000001 -num[d,7,12]: -0.0019999996 -num[a,7,13]: 1234567890123456789012345678.9110000000 -num[s,7,13]: -1234567890123456789012345678.9090000000 -num[m,7,13]: 1234567890123456789012345.6789100000 -num[d,7,13]: 0.0000000000 -num[a,7,14]: 1234567890123456789012345678.9220000000 -num[s,7,14]: -1234567890123456789012345678.9200000000 -num[m,7,14]: 1234567890123456789012345.6789210000 -num[d,7,14]: 0.0000000000 -num[a,8,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[s,8,0]: -20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[m,8,0]: 0.0000000000 -num[d,8,0]: 0.0000000000 -num[a,8,1]: -2.0000000000 -num[s,8,1]: 2.0000000000 -num[m,8,1]: 0.0000000000 -num[d,8,1]: 0.0000000000 -num[a,8,2]: 0.7940000000 -num[s,8,2]: -0.7940000000 -num[m,8,2]: 0.0000000000 -num[d,8,2]: 0.0000000000 -num[a,8,3]: 3.4400000000 -num[s,8,3]: -3.4400000000 -num[m,8,3]: 0.0000000000 -num[d,8,3]: 0.0000000000 -num[a,8,4]: 592490000000000000000000.0000000000 -num[s,8,4]: -592490000000000000000000.0000000000 -num[m,8,4]: 0.0000000000 -num[d,8,4]: 0.0000000000 -num[a,8,5]: -328400.0000000000 -num[s,8,5]: 328400.0000000000 -num[m,8,5]: 0.0000000000 -num[d,8,5]: 0.0000000000 -num[a,8,6]: 0.0000000000 -num[s,8,6]: -0.0000000000 -num[m,8,6]: 0.0000000000 -num[d,8,6]: 0.0000000000 -num[a,8,7]: 0.0010000000 -num[s,8,7]: -0.0010000000 -num[m,8,7]: 0.0000000000 -num[d,8,7]: 0.0000000000 -num[a,8,8]: 0.0000000000 -num[s,8,8]: 0.0000000000 -num[m,8,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,8,9]: -0.0000592490 -num[s,8,9]: 0.0000592490 -num[m,8,9]: 0.0000000000 -num[d,8,9]: 0.0000000000 -num[a,8,10]: 0.0032840000 -num[s,8,10]: -0.0032840000 -num[m,8,10]: 0.0000000000 -num[d,8,10]: 0.0000000000 -num[a,8,11]: 0.5000010000 -num[s,8,11]: -0.5000010000 -num[m,8,11]: 0.0000000000 -num[d,8,11]: 0.0000000000 -num[a,8,12]: -0.5000001000 -num[s,8,12]: 0.5000001000 -num[m,8,12]: 0.0000000000 -num[d,8,12]: 0.0000000000 -num[a,8,13]: 1234567890123456789012345678.9100000000 -num[s,8,13]: -1234567890123456789012345678.9100000000 -num[m,8,13]: 0.0000000000 -num[d,8,13]: 0.0000000000 -num[a,8,14]: 1234567890123456789012345678.9210000000 -num[s,8,14]: -1234567890123456789012345678.9210000000 -num[m,8,14]: 0.0000000000 -num[d,8,14]: 0.0000000000 -num[a,9,0]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9999407510 -num[s,9,0]: -20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000592490 -num[m,9,0]: -1184980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,9,0]: -0.0000000000 -num[a,9,1]: -2.0000592490 -num[s,9,1]: 1.9999407510 -num[m,9,1]: 0.0001184980 -num[d,9,1]: 0.0000296245 -num[a,9,2]: 0.7939407510 -num[s,9,2]: -0.7940592490 -num[m,9,2]: -0.0000470437 -num[d,9,2]: -0.0000746209 -num[a,9,3]: 3.4399407510 -num[s,9,3]: -3.4400592490 -num[m,9,3]: -0.0002038166 -num[d,9,3]: -0.0000172235 -num[a,9,4]: 592489999999999999999999.9999407510 -num[s,9,4]: -592490000000000000000000.0000592490 -num[m,9,4]: -35104440010000000000.0000000000 -num[d,9,4]: -0.0000000000 -num[a,9,5]: -328400.0000592490 -num[s,9,5]: 328399.9999407510 -num[m,9,5]: 19.4573716000 -num[d,9,5]: 0.0000000002 -num[a,9,6]: -0.0000592490 -num[s,9,6]: -0.0000592490 -num[m,9,6]: -0.0000000000 -num[d,9,6]: -296245000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,9,7]: 0.0009407510 -num[s,9,7]: -0.0010592490 -num[m,9,7]: -0.0000000592 -num[d,9,7]: -0.0592490000 -num[a,9,8]: -0.0000592490 -num[s,9,8]: -0.0000592490 -num[m,9,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,9,9]: -0.0001184980 -num[s,9,9]: 0.0000000000 -num[m,9,9]: 0.0000000035 -num[d,9,9]: 1.0000000000 -num[a,9,10]: 0.0032247510 -num[s,9,10]: -0.0033432490 -num[m,9,10]: -0.0000001946 -num[d,9,10]: -0.0180417174 -num[a,9,11]: 0.4999417510 -num[s,9,11]: -0.5000602490 -num[m,9,11]: -0.0000296246 -num[d,9,11]: -0.0001184978 -num[a,9,12]: -0.5000593490 -num[s,9,12]: 0.4999408510 -num[m,9,12]: 0.0000296245 -num[d,9,12]: 0.0001184980 -num[a,9,13]: 1234567890123456789012345678.9099407510 -num[s,9,13]: -1234567890123456789012345678.9100592490 -num[m,9,13]: -73146912921924691292192.4691297386 -num[d,9,13]: -0.0000000000 -num[a,9,14]: 1234567890123456789012345678.9209407510 -num[s,9,14]: -1234567890123456789012345678.9210592490 -num[m,9,14]: -73146912921924691292192.4691303903 -num[d,9,14]: -0.0000000000 -num[a,10,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0032840000 -num[s,10,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9967160000 -num[m,10,0]: 65680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,10,0]: 0.0000000000 -num[a,10,1]: -1.9967160000 -num[s,10,1]: 2.0032840000 -num[m,10,1]: -0.0065680000 -num[d,10,1]: -0.0016420000 -num[a,10,2]: 0.7972840000 -num[s,10,2]: -0.7907160000 -num[m,10,2]: 0.0026074960 -num[d,10,2]: 0.0041360202 -num[a,10,3]: 3.4432840000 -num[s,10,3]: -3.4367160000 -num[m,10,3]: 0.0112969600 -num[d,10,3]: 0.0009546512 -num[a,10,4]: 592490000000000000000000.0032840000 -num[s,10,4]: -592489999999999999999999.9967160000 -num[m,10,4]: 1945737160000000000000.0000000000 -num[d,10,4]: 0.0000000000 -num[a,10,5]: -328399.9967160000 -num[s,10,5]: 328400.0032840000 -num[m,10,5]: -1078.4656000000 -num[d,10,5]: -0.0000000100 -num[a,10,6]: 0.0032840000 -num[s,10,6]: 0.0032840000 -num[m,10,6]: 0.0000000000 -num[d,10,6]: 16420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,10,7]: 0.0042840000 -num[s,10,7]: 0.0022840000 -num[m,10,7]: 0.0000032840 -num[d,10,7]: 3.2840000000 -num[a,10,8]: 0.0032840000 -num[s,10,8]: 0.0032840000 -num[m,10,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,10,9]: 0.0032247510 -num[s,10,9]: 0.0033432490 -num[m,10,9]: -0.0000001946 -num[d,10,9]: -55.4270958160 -num[a,10,10]: 0.0065680000 -num[s,10,10]: 0.0000000000 -num[m,10,10]: 0.0000107847 -num[d,10,10]: 1.0000000000 -num[a,10,11]: 0.5032850000 -num[s,10,11]: -0.4967170000 -num[m,10,11]: 0.0016420033 -num[d,10,11]: 0.0065679869 -num[a,10,12]: -0.4967161000 -num[s,10,12]: 0.5032841000 -num[m,10,12]: -0.0016420003 -num[d,10,12]: -0.0065679987 -num[a,10,13]: 1234567890123456789012345678.9132840000 -num[s,10,13]: -1234567890123456789012345678.9067160000 -num[m,10,13]: 4054320951165432095116543.2095404400 -num[d,10,13]: 0.0000000000 -num[a,10,14]: 1234567890123456789012345678.9242840000 -num[s,10,14]: -1234567890123456789012345678.9177160000 -num[m,10,14]: 4054320951165432095116543.2095765640 -num[d,10,14]: 0.0000000000 -num[a,11,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.5000010000 -num[s,11,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.4999990000 -num[m,11,0]: 10000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,11,0]: 0.0000000000 -num[a,11,1]: -1.4999990000 -num[s,11,1]: 2.5000010000 -num[m,11,1]: -1.0000020000 -num[d,11,1]: -0.2500005000 -num[a,11,2]: 1.2940010000 -num[s,11,2]: -0.2939990000 -num[m,11,2]: 0.3970007940 -num[d,11,2]: 0.6297241814 -num[a,11,3]: 3.9400010000 -num[s,11,3]: -2.9399990000 -num[m,11,3]: 1.7200034400 -num[d,11,3]: 0.1453491279 -num[a,11,4]: 592490000000000000000000.5000010000 -num[s,11,4]: -592489999999999999999999.4999990000 -num[m,11,4]: 296245592490000000000000.0000000000 -num[d,11,4]: 0.0000000000 -num[a,11,5]: -328399.4999990000 -num[s,11,5]: 328400.5000010000 -num[m,11,5]: -164200.3284000000 -num[d,11,5]: -0.0000015225 -num[a,11,6]: 0.5000010000 -num[s,11,6]: 0.5000010000 -num[m,11,6]: 0.0000000000 -num[d,11,6]: 2500005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,11,7]: 0.5010010000 -num[s,11,7]: 0.4990010000 -num[m,11,7]: 0.0005000010 -num[d,11,7]: 500.0010000000 -num[a,11,8]: 0.5000010000 -num[s,11,8]: 0.5000010000 -num[m,11,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,11,9]: 0.4999417510 -num[s,11,9]: 0.5000602490 -num[m,11,9]: -0.0000296246 -num[d,11,9]: -8438.9778730443 -num[a,11,10]: 0.5032850000 -num[s,11,10]: 0.4967170000 -num[m,11,10]: 0.0016420033 -num[d,11,10]: 152.2536540804 -num[a,11,11]: 1.0000020000 -num[s,11,11]: 0.0000000000 -num[m,11,11]: 0.2500010000 -num[d,11,11]: 1.0000000000 -num[a,11,12]: 0.0000009000 -num[s,11,12]: 1.0000011000 -num[m,11,12]: -0.2500005500 -num[d,11,12]: -1.0000018000 -num[a,11,13]: 1234567890123456789012345679.4100010000 -num[s,11,13]: -1234567890123456789012345678.4099990000 -num[m,11,13]: 617285179629618517962961851.8006789100 -num[d,11,13]: 0.0000000000 -num[a,11,14]: 1234567890123456789012345679.4210010000 -num[s,11,14]: -1234567890123456789012345678.4209990000 -num[m,11,14]: 617285179629618517962961851.8061789210 -num[d,11,14]: 0.0000000000 -num[a,12,0]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.4999999000 -num[s,12,0]: -20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.5000001000 -num[m,12,0]: -10000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,12,0]: -0.0000000000 -num[a,12,1]: -2.5000001000 -num[s,12,1]: 1.4999999000 -num[m,12,1]: 1.0000002000 -num[d,12,1]: 0.2500000500 -num[a,12,2]: 0.2939999000 -num[s,12,2]: -1.2940001000 -num[m,12,2]: -0.3970000794 -num[d,12,2]: -0.6297230479 -num[a,12,3]: 2.9399999000 -num[s,12,3]: -3.9400001000 -num[m,12,3]: -1.7200003440 -num[d,12,3]: -0.1453488663 -num[a,12,4]: 592489999999999999999999.4999999000 -num[s,12,4]: -592490000000000000000000.5000001000 -num[m,12,4]: -296245059249000000000000.0000000000 -num[d,12,4]: -0.0000000000 -num[a,12,5]: -328400.5000001000 -num[s,12,5]: 328399.4999999000 -num[m,12,5]: 164200.0328400000 -num[d,12,5]: 0.0000015225 -num[a,12,6]: -0.5000001000 -num[s,12,6]: -0.5000001000 -num[m,12,6]: -0.0000000000 -num[d,12,6]: -2500000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,12,7]: -0.4990001000 -num[s,12,7]: -0.5010001000 -num[m,12,7]: -0.0005000001 -num[d,12,7]: -500.0001000000 -num[a,12,8]: -0.5000001000 -num[s,12,8]: -0.5000001000 -num[m,12,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,12,9]: -0.5000593490 -num[s,12,9]: -0.4999408510 -num[m,12,9]: 0.0000296245 -num[d,12,9]: 8438.9626829145 -num[a,12,10]: -0.4967161000 -num[s,12,10]: -0.5032841000 -num[m,12,10]: -0.0016420003 -num[d,12,10]: -152.2533800244 -num[a,12,11]: 0.0000009000 -num[s,12,11]: -1.0000011000 -num[m,12,11]: -0.2500005500 -num[d,12,11]: -0.9999982000 -num[a,12,12]: -1.0000002000 -num[s,12,12]: 0.0000000000 -num[m,12,12]: 0.2500001000 -num[d,12,12]: 1.0000000000 -num[a,12,13]: 1234567890123456789012345678.4099999000 -num[s,12,13]: -1234567890123456789012345679.4100001000 -num[m,12,13]: -617284068518517406851851740.6895678910 -num[d,12,13]: -0.0000000000 -num[a,12,14]: 1234567890123456789012345678.4209999000 -num[s,12,14]: -1234567890123456789012345679.4210001000 -num[m,12,14]: -617284068518517406851851740.6950678921 -num[d,12,14]: -0.0000000000 -num[a,13,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001234567890123456789012345678.9100000000 -num[s,13,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998765432109876543210987654321.0900000000 -num[m,13,0]: 24691357802469135780246913578200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,13,0]: 0.0000000000 -num[a,13,1]: 1234567890123456789012345676.9100000000 -num[s,13,1]: 1234567890123456789012345680.9100000000 -num[m,13,1]: -2469135780246913578024691357.8200000000 -num[d,13,1]: -617283945061728394506172839.4550000000 -num[a,13,2]: 1234567890123456789012345679.7040000000 -num[s,13,2]: 1234567890123456789012345678.1160000000 -num[m,13,2]: 980246904758024690475802469.0545400000 -num[d,13,2]: 1554871398140373789688092794.5969773000 -num[a,13,3]: 1234567890123456789012345682.3500000000 -num[s,13,3]: 1234567890123456789012345675.4700000000 -num[m,13,3]: 4246913542024691354202469135.4504000000 -num[d,13,3]: 358886014570772322387309790.3808140000 -num[a,13,4]: 1235160380123456789012345678.9100000000 -num[s,13,4]: 1233975400123456789012345678.9100000000 -num[m,13,4]: 731469129219246912921924691297385900000000000000000.0000000000 -num[d,13,4]: 2083.6940541165 -num[a,13,5]: 1234567890123456789012017278.9100000000 -num[s,13,5]: 1234567890123456789012674078.9100000000 -num[m,13,5]: -405432095116543209511654320954044.0000000000 -num[d,13,5]: -3759341930948406787491.9174140000 -num[a,13,6]: 1234567890123456789012345678.9100000000 -num[s,13,6]: 1234567890123456789012345678.9100000000 -num[m,13,6]: 0.0000000000 -num[d,13,6]: 6172839450617283945061728394550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,13,7]: 1234567890123456789012345678.9110000000 -num[s,13,7]: 1234567890123456789012345678.9090000000 -num[m,13,7]: 1234567890123456789012345.6789100000 -num[d,13,7]: 1234567890123456789012345678910.0000000000 -num[a,13,8]: 1234567890123456789012345678.9100000000 -num[s,13,8]: 1234567890123456789012345678.9100000000 -num[m,13,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,13,9]: 1234567890123456789012345678.9099407510 -num[s,13,9]: 1234567890123456789012345678.9100592490 -num[m,13,9]: -73146912921924691292192.4691297386 -num[d,13,9]: -20836940541164522422527733445458.9950885247 -num[a,13,10]: 1234567890123456789012345678.9132840000 -num[s,13,10]: 1234567890123456789012345678.9067160000 -num[m,13,10]: 4054320951165432095116543.2095404400 -num[d,13,10]: 375934193094840678749191741446.4068209501 -num[a,13,11]: 1234567890123456789012345679.4100010000 -num[s,13,11]: 1234567890123456789012345678.4099990000 -num[m,13,11]: 617285179629618517962961851.8006789100 -num[d,13,11]: 2469130841985229607565476226.8675462649 -num[a,13,12]: 1234567890123456789012345678.4099999000 -num[s,13,12]: 1234567890123456789012345679.4100001000 -num[m,13,12]: -617284068518517406851851740.6895678910 -num[d,13,12]: -2469135286419856294053432547.1334905733 -num[a,13,13]: 2469135780246913578024691357.8200000000 -num[s,13,13]: 0.0000000000 -num[m,13,13]: 1524157875323883675049535156278311236552659655767748818.7881000000 -num[d,13,13]: 1.0000000000 -num[a,13,14]: 2469135780246913578024691357.8310000000 -num[s,13,14]: -0.0110000000 -num[m,13,14]: 1524157875323883675049535156291891483344017680446884621.2561100000 -num[d,13,14]: 1.0000000000 -num[a,14,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001234567890123456789012345678.9210000000 -num[s,14,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998765432109876543210987654321.0790000000 -num[m,14,0]: 24691357802469135780246913578420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[d,14,0]: 0.0000000000 -num[a,14,1]: 1234567890123456789012345676.9210000000 -num[s,14,1]: 1234567890123456789012345680.9210000000 -num[m,14,1]: -2469135780246913578024691357.8420000000 -num[d,14,1]: -617283945061728394506172839.4605000000 -num[a,14,2]: 1234567890123456789012345679.7150000000 -num[s,14,2]: 1234567890123456789012345678.1270000000 -num[m,14,2]: 980246904758024690475802469.0632740000 -num[d,14,2]: 1554871398140373789688092794.6108312000 -num[a,14,3]: 1234567890123456789012345682.3610000000 -num[s,14,3]: 1234567890123456789012345675.4810000000 -num[m,14,3]: 4246913542024691354202469135.4882400000 -num[d,14,3]: 358886014570772322387309790.3840116000 -num[a,14,4]: 1235160380123456789012345678.9210000000 -num[s,14,4]: 1233975400123456789012345678.9210000000 -num[m,14,4]: 731469129219246912921924691303903290000000000000000.0000000000 -num[d,14,4]: 2083.6940541165 -num[a,14,5]: 1234567890123456789012017278.9210000000 -num[s,14,5]: 1234567890123456789012674078.9210000000 -num[m,14,5]: -405432095116543209511654320957656.4000000000 -num[d,14,5]: -3759341930948406787491.9174145000 -num[a,14,6]: 1234567890123456789012345678.9210000000 -num[s,14,6]: 1234567890123456789012345678.9210000000 -num[m,14,6]: 0.0000000000 -num[d,14,6]: 6172839450617283945061728394605000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000 -num[a,14,7]: 1234567890123456789012345678.9220000000 -num[s,14,7]: 1234567890123456789012345678.9200000000 -num[m,14,7]: 1234567890123456789012345.6789210000 -num[d,14,7]: 1234567890123456789012345678921.0000000000 -num[a,14,8]: 1234567890123456789012345678.9210000000 -num[s,14,8]: 1234567890123456789012345678.9210000000 -num[m,14,8]: 0.0000000000 -(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1 -num[a,14,9]: 1234567890123456789012345678.9209407510 -num[s,14,9]: 1234567890123456789012345678.9210592490 -num[m,14,9]: -73146912921924691292192.4691303903 -num[d,14,9]: -20836940541164522422527733445644.6522304174 -num[a,14,10]: 1234567890123456789012345678.9242840000 -num[s,14,10]: 1234567890123456789012345678.9177160000 -num[m,14,10]: 4054320951165432095116543.2095765640 -num[d,14,10]: 375934193094840678749191741449.7563946407 -num[a,14,11]: 1234567890123456789012345679.4210010000 -num[s,14,11]: 1234567890123456789012345678.4209990000 -num[m,14,11]: 617285179629618517962961851.8061789210 -num[d,14,11]: 2469130841985229607565476226.8895462209 -num[a,14,12]: 1234567890123456789012345678.4209999000 -num[s,14,12]: 1234567890123456789012345679.4210001000 -num[m,14,12]: -617284068518517406851851740.6950678921 -num[d,14,12]: -2469135286419856294053432547.1554905689 -num[a,14,13]: 2469135780246913578024691357.8310000000 -num[s,14,13]: 0.0110000000 -num[m,14,13]: 1524157875323883675049535156291891483344017680446884621.2561100000 -num[d,14,13]: 1.0000000000 -num[a,14,14]: 2469135780246913578024691357.8420000000 -num[s,14,14]: 0.0000000000 -num[m,14,14]: 1524157875323883675049535156305471730135375705126020423.7242410000 -num[d,14,14]: 1.0000000000 -0: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -1: -2 -2: 0.794 -3: 3.44 -4: 592490000000000000000000 -5: -328400 -6: 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002 -7: 0.001 -8: 0.0 -9: -0.000059249 -10: 0.003284 -11: 0.500001 -12: -0.5000001 -13: 1234567890123456789012345678.91 -14: 1234567890123456789012345678.921 diff --git a/src/interfaces/ecpg/test/resultmap b/src/interfaces/ecpg/test/resultmap deleted file mode 100644 index aef7338e81..0000000000 --- a/src/interfaces/ecpg/test/resultmap +++ /dev/null @@ -1,12 +0,0 @@ -compat_informix/dec_test:stdout:i.86-pc-win32vc=compat_informix-dec_test-MinGW32.stdout -compat_informix/dec_test:stdout:i.86-pc-mingw32=compat_informix-dec_test-MinGW32.stdout -compat_informix/dec_test:stdout:x86_64-w64-mingw32=compat_informix-dec_test-MinGW32.stdout -compat_informix/dec_test:stdout:i.86-w64-mingw32=compat_informix-dec_test-MinGW32.stdout -pgtypeslib/num_test:stdout:i.86-pc-win32vc=pgtypeslib-num_test-MinGW32.stdout -pgtypeslib/num_test:stdout:i.86-pc-mingw32=pgtypeslib-num_test-MinGW32.stdout -pgtypeslib/num_test:stdout:x86_64-w64-mingw32=pgtypeslib-num_test-MinGW32.stdout -pgtypeslib/num_test:stdout:i.86-w64-mingw32=pgtypeslib-num_test-MinGW32.stdout -pgtypeslib/num_test2:stdout:i.86-pc-win32vc=pgtypeslib-num_test2-MinGW32.stdout -pgtypeslib/num_test2:stdout:i.86-pc-mingw32=pgtypeslib-num_test2-MinGW32.stdout -pgtypeslib/num_test2:stdout:x86_64-w64-mingw32=pgtypeslib-num_test2-MinGW32.stdout -pgtypeslib/num_test2:stdout:i.86-w64-mingw32=pgtypeslib-num_test2-MinGW32.stdout diff --git a/src/port/snprintf.c b/src/port/snprintf.c index 31438dded4..d1c201fd9d 100644 --- a/src/port/snprintf.c +++ b/src/port/snprintf.c @@ -1181,6 +1181,22 @@ fmtfloat(double value, char type, int forcesign, int leftjust, } if (vallen < 0) goto fail; + + /* + * Windows, alone among our supported platforms, likes to emit + * three-digit exponent fields even when two digits would do. Hack + * such results to look like the way everyone else does it. + */ +#ifdef WIN32 + if (vallen >= 6 && + convert[vallen - 5] == 'e' && + convert[vallen - 3] == '0') + { + convert[vallen - 3] = convert[vallen - 2]; + convert[vallen - 2] = convert[vallen - 1]; + vallen--; + } +#endif } padlen = compute_padlen(minlen, vallen + zeropadlen, leftjust); @@ -1298,6 +1314,17 @@ pg_strfromd(char *str, size_t count, int precision, double value) target.failed = true; goto fail; } + +#ifdef WIN32 + if (vallen >= 6 && + convert[vallen - 5] == 'e' && + convert[vallen - 3] == '0') + { + convert[vallen - 3] = convert[vallen - 2]; + convert[vallen - 2] = convert[vallen - 1]; + vallen--; + } +#endif } } diff --git a/src/test/regress/expected/float4-exp-three-digits.out b/src/test/regress/expected/float4-exp-three-digits.out deleted file mode 100644 index f17f95697a..0000000000 --- a/src/test/regress/expected/float4-exp-three-digits.out +++ /dev/null @@ -1,259 +0,0 @@ --- --- FLOAT4 --- -CREATE TABLE FLOAT4_TBL (f1 float4); -INSERT INTO FLOAT4_TBL(f1) VALUES (' 0.0'); -INSERT INTO FLOAT4_TBL(f1) VALUES ('1004.30 '); -INSERT INTO FLOAT4_TBL(f1) VALUES (' -34.84 '); -INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e+20'); -INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e-20'); --- test for over and under flow -INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70'); -ERROR: value out of range: overflow -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70'); -ERROR: value out of range: overflow -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70'); -ERROR: value out of range: underflow -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70'); -ERROR: value out of range: underflow -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70'); - ^ --- bad input -INSERT INTO FLOAT4_TBL(f1) VALUES (''); -ERROR: invalid input syntax for type real: "" -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES (''); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES (' '); -ERROR: invalid input syntax for type real: " " -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES (' '); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('xyz'); -ERROR: invalid input syntax for type real: "xyz" -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('xyz'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('5.0.0'); -ERROR: invalid input syntax for type real: "5.0.0" -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5.0.0'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('5 . 0'); -ERROR: invalid input syntax for type real: "5 . 0" -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5 . 0'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('5. 0'); -ERROR: invalid input syntax for type real: "5. 0" -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5. 0'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES (' - 3.0'); -ERROR: invalid input syntax for type real: " - 3.0" -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES (' - 3.0'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('123 5'); -ERROR: invalid input syntax for type real: "123 5" -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('123 5'); - ^ --- special inputs -SELECT 'NaN'::float4; - float4 --------- - NaN -(1 row) - -SELECT 'nan'::float4; - float4 --------- - NaN -(1 row) - -SELECT ' NAN '::float4; - float4 --------- - NaN -(1 row) - -SELECT 'infinity'::float4; - float4 ----------- - Infinity -(1 row) - -SELECT ' -INFINiTY '::float4; - float4 ------------ - -Infinity -(1 row) - --- bad special inputs -SELECT 'N A N'::float4; -ERROR: invalid input syntax for type real: "N A N" -LINE 1: SELECT 'N A N'::float4; - ^ -SELECT 'NaN x'::float4; -ERROR: invalid input syntax for type real: "NaN x" -LINE 1: SELECT 'NaN x'::float4; - ^ -SELECT ' INFINITY x'::float4; -ERROR: invalid input syntax for type real: " INFINITY x" -LINE 1: SELECT ' INFINITY x'::float4; - ^ -SELECT 'Infinity'::float4 + 100.0; - ?column? ----------- - Infinity -(1 row) - -SELECT 'Infinity'::float4 / 'Infinity'::float4; - ?column? ----------- - NaN -(1 row) - -SELECT 'nan'::float4 / 'nan'::float4; - ?column? ----------- - NaN -(1 row) - -SELECT 'nan'::numeric::float4; - float4 --------- - NaN -(1 row) - -SELECT '' AS five, * FROM FLOAT4_TBL; - five | f1 -------+-------------- - | 0 - | 1004.3 - | -34.84 - | 1.23457e+020 - | 1.23457e-020 -(5 rows) - -SELECT '' AS four, f.* FROM FLOAT4_TBL f WHERE f.f1 <> '1004.3'; - four | f1 -------+-------------- - | 0 - | -34.84 - | 1.23457e+020 - | 1.23457e-020 -(4 rows) - -SELECT '' AS one, f.* FROM FLOAT4_TBL f WHERE f.f1 = '1004.3'; - one | f1 ------+-------- - | 1004.3 -(1 row) - -SELECT '' AS three, f.* FROM FLOAT4_TBL f WHERE '1004.3' > f.f1; - three | f1 --------+-------------- - | 0 - | -34.84 - | 1.23457e-020 -(3 rows) - -SELECT '' AS three, f.* FROM FLOAT4_TBL f WHERE f.f1 < '1004.3'; - three | f1 --------+-------------- - | 0 - | -34.84 - | 1.23457e-020 -(3 rows) - -SELECT '' AS four, f.* FROM FLOAT4_TBL f WHERE '1004.3' >= f.f1; - four | f1 -------+-------------- - | 0 - | 1004.3 - | -34.84 - | 1.23457e-020 -(4 rows) - -SELECT '' AS four, f.* FROM FLOAT4_TBL f WHERE f.f1 <= '1004.3'; - four | f1 -------+-------------- - | 0 - | 1004.3 - | -34.84 - | 1.23457e-020 -(4 rows) - -SELECT '' AS three, f.f1, f.f1 * '-10' AS x FROM FLOAT4_TBL f - WHERE f.f1 > '0.0'; - three | f1 | x --------+--------------+--------------- - | 1004.3 | -10043 - | 1.23457e+020 | -1.23457e+021 - | 1.23457e-020 | -1.23457e-019 -(3 rows) - -SELECT '' AS three, f.f1, f.f1 + '-10' AS x FROM FLOAT4_TBL f - WHERE f.f1 > '0.0'; - three | f1 | x --------+--------------+-------------- - | 1004.3 | 994.3 - | 1.23457e+020 | 1.23457e+020 - | 1.23457e-020 | -10 -(3 rows) - -SELECT '' AS three, f.f1, f.f1 / '-10' AS x FROM FLOAT4_TBL f - WHERE f.f1 > '0.0'; - three | f1 | x --------+--------------+--------------- - | 1004.3 | -100.43 - | 1.23457e+020 | -1.23457e+019 - | 1.23457e-020 | -1.23457e-021 -(3 rows) - -SELECT '' AS three, f.f1, f.f1 - '-10' AS x FROM FLOAT4_TBL f - WHERE f.f1 > '0.0'; - three | f1 | x --------+--------------+-------------- - | 1004.3 | 1014.3 - | 1.23457e+020 | 1.23457e+020 - | 1.23457e-020 | 10 -(3 rows) - --- test divide by zero -SELECT '' AS bad, f.f1 / '0.0' from FLOAT4_TBL f; -ERROR: division by zero -SELECT '' AS five, * FROM FLOAT4_TBL; - five | f1 -------+-------------- - | 0 - | 1004.3 - | -34.84 - | 1.23457e+020 - | 1.23457e-020 -(5 rows) - --- test the unary float4abs operator -SELECT '' AS five, f.f1, @f.f1 AS abs_f1 FROM FLOAT4_TBL f; - five | f1 | abs_f1 -------+--------------+-------------- - | 0 | 0 - | 1004.3 | 1004.3 - | -34.84 | 34.84 - | 1.23457e+020 | 1.23457e+020 - | 1.23457e-020 | 1.23457e-020 -(5 rows) - -UPDATE FLOAT4_TBL - SET f1 = FLOAT4_TBL.f1 * '-1' - WHERE FLOAT4_TBL.f1 > '0.0'; -SELECT '' AS five, * FROM FLOAT4_TBL; - five | f1 -------+--------------- - | 0 - | -34.84 - | -1004.3 - | -1.23457e+020 - | -1.23457e-020 -(5 rows) - diff --git a/src/test/regress/expected/float8-exp-three-digits-win32.out b/src/test/regress/expected/float8-exp-three-digits-win32.out deleted file mode 100644 index 3896cdec72..0000000000 --- a/src/test/regress/expected/float8-exp-three-digits-win32.out +++ /dev/null @@ -1,586 +0,0 @@ --- --- FLOAT8 --- -CREATE TABLE FLOAT8_TBL(f1 float8); -INSERT INTO FLOAT8_TBL(f1) VALUES (' 0.0 '); -INSERT INTO FLOAT8_TBL(f1) VALUES ('1004.30 '); -INSERT INTO FLOAT8_TBL(f1) VALUES (' -34.84'); -INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); -INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); --- test for underflow and overflow handling -SELECT '10e400'::float8; -ERROR: "10e400" is out of range for type double precision -LINE 1: SELECT '10e400'::float8; - ^ -SELECT '-10e400'::float8; -ERROR: "-10e400" is out of range for type double precision -LINE 1: SELECT '-10e400'::float8; - ^ -SELECT '10e-400'::float8; -ERROR: "10e-400" is out of range for type double precision -LINE 1: SELECT '10e-400'::float8; - ^ -SELECT '-10e-400'::float8; -ERROR: "-10e-400" is out of range for type double precision -LINE 1: SELECT '-10e-400'::float8; - ^ --- bad input -INSERT INTO FLOAT8_TBL(f1) VALUES (''); -ERROR: invalid input syntax for type double precision: "" -LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES (''); - ^ -INSERT INTO FLOAT8_TBL(f1) VALUES (' '); -ERROR: invalid input syntax for type double precision: " " -LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES (' '); - ^ -INSERT INTO FLOAT8_TBL(f1) VALUES ('xyz'); -ERROR: invalid input syntax for type double precision: "xyz" -LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('xyz'); - ^ -INSERT INTO FLOAT8_TBL(f1) VALUES ('5.0.0'); -ERROR: invalid input syntax for type double precision: "5.0.0" -LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5.0.0'); - ^ -INSERT INTO FLOAT8_TBL(f1) VALUES ('5 . 0'); -ERROR: invalid input syntax for type double precision: "5 . 0" -LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5 . 0'); - ^ -INSERT INTO FLOAT8_TBL(f1) VALUES ('5. 0'); -ERROR: invalid input syntax for type double precision: "5. 0" -LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5. 0'); - ^ -INSERT INTO FLOAT8_TBL(f1) VALUES (' - 3'); -ERROR: invalid input syntax for type double precision: " - 3" -LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES (' - 3'); - ^ -INSERT INTO FLOAT8_TBL(f1) VALUES ('123 5'); -ERROR: invalid input syntax for type double precision: "123 5" -LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('123 5'); - ^ --- special inputs -SELECT 'NaN'::float8; - float8 --------- - NaN -(1 row) - -SELECT 'nan'::float8; - float8 --------- - NaN -(1 row) - -SELECT ' NAN '::float8; - float8 --------- - NaN -(1 row) - -SELECT 'infinity'::float8; - float8 ----------- - Infinity -(1 row) - -SELECT ' -INFINiTY '::float8; - float8 ------------ - -Infinity -(1 row) - --- bad special inputs -SELECT 'N A N'::float8; -ERROR: invalid input syntax for type double precision: "N A N" -LINE 1: SELECT 'N A N'::float8; - ^ -SELECT 'NaN x'::float8; -ERROR: invalid input syntax for type double precision: "NaN x" -LINE 1: SELECT 'NaN x'::float8; - ^ -SELECT ' INFINITY x'::float8; -ERROR: invalid input syntax for type double precision: " INFINITY x" -LINE 1: SELECT ' INFINITY x'::float8; - ^ -SELECT 'Infinity'::float8 + 100.0; - ?column? ----------- - Infinity -(1 row) - -SELECT 'Infinity'::float8 / 'Infinity'::float8; - ?column? ----------- - NaN -(1 row) - -SELECT 'nan'::float8 / 'nan'::float8; - ?column? ----------- - NaN -(1 row) - -SELECT 'nan'::numeric::float8; - float8 --------- - NaN -(1 row) - -SELECT '' AS five, * FROM FLOAT8_TBL; - five | f1 -------+---------------------- - | 0 - | 1004.3 - | -34.84 - | 1.2345678901234e+200 - | 1.2345678901234e-200 -(5 rows) - -SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE f.f1 <> '1004.3'; - four | f1 -------+---------------------- - | 0 - | -34.84 - | 1.2345678901234e+200 - | 1.2345678901234e-200 -(4 rows) - -SELECT '' AS one, f.* FROM FLOAT8_TBL f WHERE f.f1 = '1004.3'; - one | f1 ------+-------- - | 1004.3 -(1 row) - -SELECT '' AS three, f.* FROM FLOAT8_TBL f WHERE '1004.3' > f.f1; - three | f1 --------+---------------------- - | 0 - | -34.84 - | 1.2345678901234e-200 -(3 rows) - -SELECT '' AS three, f.* FROM FLOAT8_TBL f WHERE f.f1 < '1004.3'; - three | f1 --------+---------------------- - | 0 - | -34.84 - | 1.2345678901234e-200 -(3 rows) - -SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE '1004.3' >= f.f1; - four | f1 -------+---------------------- - | 0 - | 1004.3 - | -34.84 - | 1.2345678901234e-200 -(4 rows) - -SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE f.f1 <= '1004.3'; - four | f1 -------+---------------------- - | 0 - | 1004.3 - | -34.84 - | 1.2345678901234e-200 -(4 rows) - -SELECT '' AS three, f.f1, f.f1 * '-10' AS x - FROM FLOAT8_TBL f - WHERE f.f1 > '0.0'; - three | f1 | x --------+----------------------+----------------------- - | 1004.3 | -10043 - | 1.2345678901234e+200 | -1.2345678901234e+201 - | 1.2345678901234e-200 | -1.2345678901234e-199 -(3 rows) - -SELECT '' AS three, f.f1, f.f1 + '-10' AS x - FROM FLOAT8_TBL f - WHERE f.f1 > '0.0'; - three | f1 | x --------+----------------------+---------------------- - | 1004.3 | 994.3 - | 1.2345678901234e+200 | 1.2345678901234e+200 - | 1.2345678901234e-200 | -10 -(3 rows) - -SELECT '' AS three, f.f1, f.f1 / '-10' AS x - FROM FLOAT8_TBL f - WHERE f.f1 > '0.0'; - three | f1 | x --------+----------------------+----------------------- - | 1004.3 | -100.43 - | 1.2345678901234e+200 | -1.2345678901234e+199 - | 1.2345678901234e-200 | -1.2345678901234e-201 -(3 rows) - -SELECT '' AS three, f.f1, f.f1 - '-10' AS x - FROM FLOAT8_TBL f - WHERE f.f1 > '0.0'; - three | f1 | x --------+----------------------+---------------------- - | 1004.3 | 1014.3 - | 1.2345678901234e+200 | 1.2345678901234e+200 - | 1.2345678901234e-200 | 10 -(3 rows) - -SELECT '' AS one, f.f1 ^ '2.0' AS square_f1 - FROM FLOAT8_TBL f where f.f1 = '1004.3'; - one | square_f1 ------+------------ - | 1008618.49 -(1 row) - --- absolute value -SELECT '' AS five, f.f1, @f.f1 AS abs_f1 - FROM FLOAT8_TBL f; - five | f1 | abs_f1 -------+----------------------+---------------------- - | 0 | 0 - | 1004.3 | 1004.3 - | -34.84 | 34.84 - | 1.2345678901234e+200 | 1.2345678901234e+200 - | 1.2345678901234e-200 | 1.2345678901234e-200 -(5 rows) - --- truncate -SELECT '' AS five, f.f1, trunc(f.f1) AS trunc_f1 - FROM FLOAT8_TBL f; - five | f1 | trunc_f1 -------+----------------------+---------------------- - | 0 | 0 - | 1004.3 | 1004 - | -34.84 | -34 - | 1.2345678901234e+200 | 1.2345678901234e+200 - | 1.2345678901234e-200 | 0 -(5 rows) - --- round -SELECT '' AS five, f.f1, round(f.f1) AS round_f1 - FROM FLOAT8_TBL f; - five | f1 | round_f1 -------+----------------------+---------------------- - | 0 | 0 - | 1004.3 | 1004 - | -34.84 | -35 - | 1.2345678901234e+200 | 1.2345678901234e+200 - | 1.2345678901234e-200 | 0 -(5 rows) - --- ceil / ceiling -select ceil(f1) as ceil_f1 from float8_tbl f; - ceil_f1 ----------------------- - 0 - 1005 - -34 - 1.2345678901234e+200 - 1 -(5 rows) - -select ceiling(f1) as ceiling_f1 from float8_tbl f; - ceiling_f1 ----------------------- - 0 - 1005 - -34 - 1.2345678901234e+200 - 1 -(5 rows) - --- floor -select floor(f1) as floor_f1 from float8_tbl f; - floor_f1 ----------------------- - 0 - 1004 - -35 - 1.2345678901234e+200 - 0 -(5 rows) - --- sign -select sign(f1) as sign_f1 from float8_tbl f; - sign_f1 ---------- - 0 - 1 - -1 - 1 - 1 -(5 rows) - --- square root -SELECT sqrt(float8 '64') AS eight; - eight -------- - 8 -(1 row) - -SELECT |/ float8 '64' AS eight; - eight -------- - 8 -(1 row) - -SELECT '' AS three, f.f1, |/f.f1 AS sqrt_f1 - FROM FLOAT8_TBL f - WHERE f.f1 > '0.0'; - three | f1 | sqrt_f1 --------+----------------------+----------------------- - | 1004.3 | 31.6906926399535 - | 1.2345678901234e+200 | 1.11111110611109e+100 - | 1.2345678901234e-200 | 1.11111110611109e-100 -(3 rows) - --- power -SELECT power(float8 '144', float8 '0.5'); - power -------- - 12 -(1 row) - -SELECT power(float8 'NaN', float8 '0.5'); - power -------- - NaN -(1 row) - -SELECT power(float8 '144', float8 'NaN'); - power -------- - NaN -(1 row) - -SELECT power(float8 'NaN', float8 'NaN'); - power -------- - NaN -(1 row) - -SELECT power(float8 '-1', float8 'NaN'); - power -------- - NaN -(1 row) - -SELECT power(float8 '1', float8 'NaN'); - power -------- - 1 -(1 row) - -SELECT power(float8 'NaN', float8 '0'); - power -------- - 1 -(1 row) - --- take exp of ln(f.f1) -SELECT '' AS three, f.f1, exp(ln(f.f1)) AS exp_ln_f1 - FROM FLOAT8_TBL f - WHERE f.f1 > '0.0'; - three | f1 | exp_ln_f1 --------+----------------------+----------------------- - | 1004.3 | 1004.3 - | 1.2345678901234e+200 | 1.23456789012338e+200 - | 1.2345678901234e-200 | 1.23456789012339e-200 -(3 rows) - --- cube root -SELECT ||/ float8 '27' AS three; - three -------- - 3 -(1 row) - -SELECT '' AS five, f.f1, ||/f.f1 AS cbrt_f1 FROM FLOAT8_TBL f; - five | f1 | cbrt_f1 -------+----------------------+----------------------- - | 0 | 0 - | 1004.3 | 10.014312837827 - | -34.84 | -3.26607421344208 - | 1.2345678901234e+200 | 4.97933859234765e+066 - | 1.2345678901234e-200 | 2.3112042409018e-067 -(5 rows) - -SELECT '' AS five, * FROM FLOAT8_TBL; - five | f1 -------+---------------------- - | 0 - | 1004.3 - | -34.84 - | 1.2345678901234e+200 - | 1.2345678901234e-200 -(5 rows) - -UPDATE FLOAT8_TBL - SET f1 = FLOAT8_TBL.f1 * '-1' - WHERE FLOAT8_TBL.f1 > '0.0'; -SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f; -ERROR: value out of range: overflow -SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f; -ERROR: value out of range: overflow -SELECT 0 ^ 0 + 0 ^ 1 + 0 ^ 0.0 + 0 ^ 0.5; - ?column? ----------- - 2 -(1 row) - -SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ; -ERROR: cannot take logarithm of zero -SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 < '0.0' ; -ERROR: cannot take logarithm of a negative number -SELECT '' AS bad, exp(f.f1) from FLOAT8_TBL f; -ERROR: value out of range: underflow -SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f; -ERROR: division by zero -SELECT '' AS five, * FROM FLOAT8_TBL; - five | f1 -------+----------------------- - | 0 - | -34.84 - | -1004.3 - | -1.2345678901234e+200 - | -1.2345678901234e-200 -(5 rows) - --- test for over- and underflow -INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400'); -ERROR: "10e400" is out of range for type double precision -LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400'); - ^ -INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400'); -ERROR: "-10e400" is out of range for type double precision -LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400'); - ^ -INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400'); -ERROR: "10e-400" is out of range for type double precision -LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400'); - ^ -INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400'); -ERROR: "-10e-400" is out of range for type double precision -LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400'); - ^ --- maintain external table consistency across platforms --- delete all values and reinsert well-behaved ones -DELETE FROM FLOAT8_TBL; -INSERT INTO FLOAT8_TBL(f1) VALUES ('0.0'); -INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84'); -INSERT INTO FLOAT8_TBL(f1) VALUES ('-1004.30'); -INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e+200'); -INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e-200'); -SELECT '' AS five, * FROM FLOAT8_TBL; - five | f1 -------+----------------------- - | 0 - | -34.84 - | -1004.3 - | -1.2345678901234e+200 - | -1.2345678901234e-200 -(5 rows) - --- test exact cases for trigonometric functions in degrees -SET extra_float_digits = 3; -SELECT x, - sind(x), - sind(x) IN (-1,-0.5,0,0.5,1) AS sind_exact -FROM (VALUES (0), (30), (90), (150), (180), - (210), (270), (330), (360)) AS t(x); - x | sind | sind_exact ------+------+------------ - 0 | 0 | t - 30 | 0.5 | t - 90 | 1 | t - 150 | 0.5 | t - 180 | 0 | t - 210 | -0.5 | t - 270 | -1 | t - 330 | -0.5 | t - 360 | 0 | t -(9 rows) - -SELECT x, - cosd(x), - cosd(x) IN (-1,-0.5,0,0.5,1) AS cosd_exact -FROM (VALUES (0), (60), (90), (120), (180), - (240), (270), (300), (360)) AS t(x); - x | cosd | cosd_exact ------+------+------------ - 0 | 1 | t - 60 | 0.5 | t - 90 | 0 | t - 120 | -0.5 | t - 180 | -1 | t - 240 | -0.5 | t - 270 | 0 | t - 300 | 0.5 | t - 360 | 1 | t -(9 rows) - -SELECT x, - tand(x), - tand(x) IN ('-Infinity'::float8,-1,0, - 1,'Infinity'::float8) AS tand_exact, - cotd(x), - cotd(x) IN ('-Infinity'::float8,-1,0, - 1,'Infinity'::float8) AS cotd_exact -FROM (VALUES (0), (45), (90), (135), (180), - (225), (270), (315), (360)) AS t(x); - x | tand | tand_exact | cotd | cotd_exact ------+-----------+------------+-----------+------------ - 0 | 0 | t | Infinity | t - 45 | 1 | t | 1 | t - 90 | Infinity | t | 0 | t - 135 | -1 | t | -1 | t - 180 | 0 | t | -Infinity | t - 225 | 1 | t | 1 | t - 270 | -Infinity | t | 0 | t - 315 | -1 | t | -1 | t - 360 | 0 | t | Infinity | t -(9 rows) - -SELECT x, - asind(x), - asind(x) IN (-90,-30,0,30,90) AS asind_exact, - acosd(x), - acosd(x) IN (0,60,90,120,180) AS acosd_exact -FROM (VALUES (-1), (-0.5), (0), (0.5), (1)) AS t(x); - x | asind | asind_exact | acosd | acosd_exact -------+-------+-------------+-------+------------- - -1 | -90 | t | 180 | t - -0.5 | -30 | t | 120 | t - 0 | 0 | t | 90 | t - 0.5 | 30 | t | 60 | t - 1 | 90 | t | 0 | t -(5 rows) - -SELECT x, - atand(x), - atand(x) IN (-90,-45,0,45,90) AS atand_exact -FROM (VALUES ('-Infinity'::float8), (-1), (0), (1), - ('Infinity'::float8)) AS t(x); - x | atand | atand_exact ------------+-------+------------- - -Infinity | -90 | t - -1 | -45 | t - 0 | 0 | t - 1 | 45 | t - Infinity | 90 | t -(5 rows) - -SELECT x, y, - atan2d(y, x), - atan2d(y, x) IN (-90,0,90,180) AS atan2d_exact -FROM (SELECT 10*cosd(a), 10*sind(a) - FROM generate_series(0, 360, 90) AS t(a)) AS t(x,y); - x | y | atan2d | atan2d_exact ------+-----+--------+-------------- - 10 | 0 | 0 | t - 0 | 10 | 90 | t - -10 | 0 | 180 | t - 0 | -10 | -90 | t - 10 | 0 | 0 | t -(5 rows) - -RESET extra_float_digits; diff --git a/src/test/regress/expected/geometry_1.out b/src/test/regress/expected/geometry_1.out deleted file mode 100644 index 16ca7cd309..0000000000 --- a/src/test/regress/expected/geometry_1.out +++ /dev/null @@ -1,4890 +0,0 @@ --- --- GEOMETRY --- --- Back off displayed precision a little bit to reduce platform-to-platform --- variation in results. -SET extra_float_digits TO -3; --- --- Points --- -SELECT '' AS four, center(f1) AS center - FROM BOX_TBL; - four | center -------+--------- - | (1,1) - | (2,2) - | (-5,-4) - | (2.5,3) - | (3,3) -(5 rows) - -SELECT '' AS four, (@@ f1) AS center - FROM BOX_TBL; - four | center -------+--------- - | (1,1) - | (2,2) - | (-5,-4) - | (2.5,3) - | (3,3) -(5 rows) - -SELECT '' AS six, point(f1) AS center - FROM CIRCLE_TBL; - six | center ------+----------- - | (5,1) - | (1,2) - | (1,3) - | (1,2) - | (100,200) - | (100,1) - | (3,5) - | (3,5) -(8 rows) - -SELECT '' AS six, (@@ f1) AS center - FROM CIRCLE_TBL; - six | center ------+----------- - | (5,1) - | (1,2) - | (1,3) - | (1,2) - | (100,200) - | (100,1) - | (3,5) - | (3,5) -(8 rows) - -SELECT '' AS two, (@@ f1) AS center - FROM POLYGON_TBL - WHERE (# f1) > 2; - two | center ------+------------------------------- - | (1.33333333333,1.33333333333) - | (2.33333333333,1.33333333333) - | (4,5) - | (4,5) - | (4,3) -(5 rows) - --- "is horizontal" function -SELECT '' AS two, p1.f1 - FROM POINT_TBL p1 - WHERE ishorizontal(p1.f1, point '(0,0)'); - two | f1 ------+------------------ - | (0,0) - | (-10,0) - | (1e-300,-1e-300) -(3 rows) - --- "is horizontal" operator -SELECT '' AS two, p1.f1 - FROM POINT_TBL p1 - WHERE p1.f1 ?- point '(0,0)'; - two | f1 ------+------------------ - | (0,0) - | (-10,0) - | (1e-300,-1e-300) -(3 rows) - --- "is vertical" function -SELECT '' AS one, p1.f1 - FROM POINT_TBL p1 - WHERE isvertical(p1.f1, point '(5.1,34.5)'); - one | f1 ------+------------ - | (5.1,34.5) -(1 row) - --- "is vertical" operator -SELECT '' AS one, p1.f1 - FROM POINT_TBL p1 - WHERE p1.f1 ?| point '(5.1,34.5)'; - one | f1 ------+------------ - | (5.1,34.5) -(1 row) - --- Slope -SELECT p1.f1, p2.f1, slope(p1.f1, p2.f1) FROM POINT_TBL p1, POINT_TBL p2; - f1 | f1 | slope --------------------+-------------------+-------------------- - (0,0) | (0,0) | 1.79769313486e+308 - (0,0) | (-10,0) | 0 - (0,0) | (-3,4) | -1.33333333333 - (0,0) | (5.1,34.5) | 6.76470588235 - (0,0) | (-5,-12) | 2.4 - (0,0) | (1e-300,-1e-300) | 1.79769313486e+308 - (0,0) | (1e+300,Infinity) | Infinity - (0,0) | (NaN,NaN) | NaN - (0,0) | (10,10) | 1 - (-10,0) | (0,0) | 0 - (-10,0) | (-10,0) | 1.79769313486e+308 - (-10,0) | (-3,4) | 0.571428571429 - (-10,0) | (5.1,34.5) | 2.28476821192 - (-10,0) | (-5,-12) | -2.4 - (-10,0) | (1e-300,-1e-300) | 0 - (-10,0) | (1e+300,Infinity) | Infinity - (-10,0) | (NaN,NaN) | NaN - (-10,0) | (10,10) | 0.5 - (-3,4) | (0,0) | -1.33333333333 - (-3,4) | (-10,0) | 0.571428571429 - (-3,4) | (-3,4) | 1.79769313486e+308 - (-3,4) | (5.1,34.5) | 3.76543209877 - (-3,4) | (-5,-12) | 8 - (-3,4) | (1e-300,-1e-300) | -1.33333333333 - (-3,4) | (1e+300,Infinity) | Infinity - (-3,4) | (NaN,NaN) | NaN - (-3,4) | (10,10) | 0.461538461538 - (5.1,34.5) | (0,0) | 6.76470588235 - (5.1,34.5) | (-10,0) | 2.28476821192 - (5.1,34.5) | (-3,4) | 3.76543209877 - (5.1,34.5) | (5.1,34.5) | 1.79769313486e+308 - (5.1,34.5) | (-5,-12) | 4.60396039604 - (5.1,34.5) | (1e-300,-1e-300) | 6.76470588235 - (5.1,34.5) | (1e+300,Infinity) | Infinity - (5.1,34.5) | (NaN,NaN) | NaN - (5.1,34.5) | (10,10) | -5 - (-5,-12) | (0,0) | 2.4 - (-5,-12) | (-10,0) | -2.4 - (-5,-12) | (-3,4) | 8 - (-5,-12) | (5.1,34.5) | 4.60396039604 - (-5,-12) | (-5,-12) | 1.79769313486e+308 - (-5,-12) | (1e-300,-1e-300) | 2.4 - (-5,-12) | (1e+300,Infinity) | Infinity - (-5,-12) | (NaN,NaN) | NaN - (-5,-12) | (10,10) | 1.46666666667 - (1e-300,-1e-300) | (0,0) | 1.79769313486e+308 - (1e-300,-1e-300) | (-10,0) | 0 - (1e-300,-1e-300) | (-3,4) | -1.33333333333 - (1e-300,-1e-300) | (5.1,34.5) | 6.76470588235 - (1e-300,-1e-300) | (-5,-12) | 2.4 - (1e-300,-1e-300) | (1e-300,-1e-300) | 1.79769313486e+308 - (1e-300,-1e-300) | (1e+300,Infinity) | Infinity - (1e-300,-1e-300) | (NaN,NaN) | NaN - (1e-300,-1e-300) | (10,10) | 1 - (1e+300,Infinity) | (0,0) | Infinity - (1e+300,Infinity) | (-10,0) | Infinity - (1e+300,Infinity) | (-3,4) | Infinity - (1e+300,Infinity) | (5.1,34.5) | Infinity - (1e+300,Infinity) | (-5,-12) | Infinity - (1e+300,Infinity) | (1e-300,-1e-300) | Infinity - (1e+300,Infinity) | (1e+300,Infinity) | 1.79769313486e+308 - (1e+300,Infinity) | (NaN,NaN) | NaN - (1e+300,Infinity) | (10,10) | Infinity - (NaN,NaN) | (0,0) | NaN - (NaN,NaN) | (-10,0) | NaN - (NaN,NaN) | (-3,4) | NaN - (NaN,NaN) | (5.1,34.5) | NaN - (NaN,NaN) | (-5,-12) | NaN - (NaN,NaN) | (1e-300,-1e-300) | NaN - (NaN,NaN) | (1e+300,Infinity) | NaN - (NaN,NaN) | (NaN,NaN) | NaN - (NaN,NaN) | (10,10) | NaN - (10,10) | (0,0) | 1 - (10,10) | (-10,0) | 0.5 - (10,10) | (-3,4) | 0.461538461538 - (10,10) | (5.1,34.5) | -5 - (10,10) | (-5,-12) | 1.46666666667 - (10,10) | (1e-300,-1e-300) | 1 - (10,10) | (1e+300,Infinity) | Infinity - (10,10) | (NaN,NaN) | NaN - (10,10) | (10,10) | 1.79769313486e+308 -(81 rows) - --- Add point -SELECT p1.f1, p2.f1, p1.f1 + p2.f1 FROM POINT_TBL p1, POINT_TBL p2; - f1 | f1 | ?column? --------------------+-------------------+------------------- - (0,0) | (0,0) | (0,0) - (0,0) | (-10,0) | (-10,0) - (0,0) | (-3,4) | (-3,4) - (0,0) | (5.1,34.5) | (5.1,34.5) - (0,0) | (-5,-12) | (-5,-12) - (0,0) | (1e-300,-1e-300) | (1e-300,-1e-300) - (0,0) | (1e+300,Infinity) | (1e+300,Infinity) - (0,0) | (NaN,NaN) | (NaN,NaN) - (0,0) | (10,10) | (10,10) - (-10,0) | (0,0) | (-10,0) - (-10,0) | (-10,0) | (-20,0) - (-10,0) | (-3,4) | (-13,4) - (-10,0) | (5.1,34.5) | (-4.9,34.5) - (-10,0) | (-5,-12) | (-15,-12) - (-10,0) | (1e-300,-1e-300) | (-10,-1e-300) - (-10,0) | (1e+300,Infinity) | (1e+300,Infinity) - (-10,0) | (NaN,NaN) | (NaN,NaN) - (-10,0) | (10,10) | (0,10) - (-3,4) | (0,0) | (-3,4) - (-3,4) | (-10,0) | (-13,4) - (-3,4) | (-3,4) | (-6,8) - (-3,4) | (5.1,34.5) | (2.1,38.5) - (-3,4) | (-5,-12) | (-8,-8) - (-3,4) | (1e-300,-1e-300) | (-3,4) - (-3,4) | (1e+300,Infinity) | (1e+300,Infinity) - (-3,4) | (NaN,NaN) | (NaN,NaN) - (-3,4) | (10,10) | (7,14) - (5.1,34.5) | (0,0) | (5.1,34.5) - (5.1,34.5) | (-10,0) | (-4.9,34.5) - (5.1,34.5) | (-3,4) | (2.1,38.5) - (5.1,34.5) | (5.1,34.5) | (10.2,69) - (5.1,34.5) | (-5,-12) | (0.1,22.5) - (5.1,34.5) | (1e-300,-1e-300) | (5.1,34.5) - (5.1,34.5) | (1e+300,Infinity) | (1e+300,Infinity) - (5.1,34.5) | (NaN,NaN) | (NaN,NaN) - (5.1,34.5) | (10,10) | (15.1,44.5) - (-5,-12) | (0,0) | (-5,-12) - (-5,-12) | (-10,0) | (-15,-12) - (-5,-12) | (-3,4) | (-8,-8) - (-5,-12) | (5.1,34.5) | (0.1,22.5) - (-5,-12) | (-5,-12) | (-10,-24) - (-5,-12) | (1e-300,-1e-300) | (-5,-12) - (-5,-12) | (1e+300,Infinity) | (1e+300,Infinity) - (-5,-12) | (NaN,NaN) | (NaN,NaN) - (-5,-12) | (10,10) | (5,-2) - (1e-300,-1e-300) | (0,0) | (1e-300,-1e-300) - (1e-300,-1e-300) | (-10,0) | (-10,-1e-300) - (1e-300,-1e-300) | (-3,4) | (-3,4) - (1e-300,-1e-300) | (5.1,34.5) | (5.1,34.5) - (1e-300,-1e-300) | (-5,-12) | (-5,-12) - (1e-300,-1e-300) | (1e-300,-1e-300) | (2e-300,-2e-300) - (1e-300,-1e-300) | (1e+300,Infinity) | (1e+300,Infinity) - (1e-300,-1e-300) | (NaN,NaN) | (NaN,NaN) - (1e-300,-1e-300) | (10,10) | (10,10) - (1e+300,Infinity) | (0,0) | (1e+300,Infinity) - (1e+300,Infinity) | (-10,0) | (1e+300,Infinity) - (1e+300,Infinity) | (-3,4) | (1e+300,Infinity) - (1e+300,Infinity) | (5.1,34.5) | (1e+300,Infinity) - (1e+300,Infinity) | (-5,-12) | (1e+300,Infinity) - (1e+300,Infinity) | (1e-300,-1e-300) | (1e+300,Infinity) - (1e+300,Infinity) | (1e+300,Infinity) | (2e+300,Infinity) - (1e+300,Infinity) | (NaN,NaN) | (NaN,NaN) - (1e+300,Infinity) | (10,10) | (1e+300,Infinity) - (NaN,NaN) | (0,0) | (NaN,NaN) - (NaN,NaN) | (-10,0) | (NaN,NaN) - (NaN,NaN) | (-3,4) | (NaN,NaN) - (NaN,NaN) | (5.1,34.5) | (NaN,NaN) - (NaN,NaN) | (-5,-12) | (NaN,NaN) - (NaN,NaN) | (1e-300,-1e-300) | (NaN,NaN) - (NaN,NaN) | (1e+300,Infinity) | (NaN,NaN) - (NaN,NaN) | (NaN,NaN) | (NaN,NaN) - (NaN,NaN) | (10,10) | (NaN,NaN) - (10,10) | (0,0) | (10,10) - (10,10) | (-10,0) | (0,10) - (10,10) | (-3,4) | (7,14) - (10,10) | (5.1,34.5) | (15.1,44.5) - (10,10) | (-5,-12) | (5,-2) - (10,10) | (1e-300,-1e-300) | (10,10) - (10,10) | (1e+300,Infinity) | (1e+300,Infinity) - (10,10) | (NaN,NaN) | (NaN,NaN) - (10,10) | (10,10) | (20,20) -(81 rows) - --- Subtract point -SELECT p1.f1, p2.f1, p1.f1 - p2.f1 FROM POINT_TBL p1, POINT_TBL p2; - f1 | f1 | ?column? --------------------+-------------------+--------------------- - (0,0) | (0,0) | (0,0) - (0,0) | (-10,0) | (10,0) - (0,0) | (-3,4) | (3,-4) - (0,0) | (5.1,34.5) | (-5.1,-34.5) - (0,0) | (-5,-12) | (5,12) - (0,0) | (1e-300,-1e-300) | (-1e-300,1e-300) - (0,0) | (1e+300,Infinity) | (-1e+300,-Infinity) - (0,0) | (NaN,NaN) | (NaN,NaN) - (0,0) | (10,10) | (-10,-10) - (-10,0) | (0,0) | (-10,0) - (-10,0) | (-10,0) | (0,0) - (-10,0) | (-3,4) | (-7,-4) - (-10,0) | (5.1,34.5) | (-15.1,-34.5) - (-10,0) | (-5,-12) | (-5,12) - (-10,0) | (1e-300,-1e-300) | (-10,1e-300) - (-10,0) | (1e+300,Infinity) | (-1e+300,-Infinity) - (-10,0) | (NaN,NaN) | (NaN,NaN) - (-10,0) | (10,10) | (-20,-10) - (-3,4) | (0,0) | (-3,4) - (-3,4) | (-10,0) | (7,4) - (-3,4) | (-3,4) | (0,0) - (-3,4) | (5.1,34.5) | (-8.1,-30.5) - (-3,4) | (-5,-12) | (2,16) - (-3,4) | (1e-300,-1e-300) | (-3,4) - (-3,4) | (1e+300,Infinity) | (-1e+300,-Infinity) - (-3,4) | (NaN,NaN) | (NaN,NaN) - (-3,4) | (10,10) | (-13,-6) - (5.1,34.5) | (0,0) | (5.1,34.5) - (5.1,34.5) | (-10,0) | (15.1,34.5) - (5.1,34.5) | (-3,4) | (8.1,30.5) - (5.1,34.5) | (5.1,34.5) | (0,0) - (5.1,34.5) | (-5,-12) | (10.1,46.5) - (5.1,34.5) | (1e-300,-1e-300) | (5.1,34.5) - (5.1,34.5) | (1e+300,Infinity) | (-1e+300,-Infinity) - (5.1,34.5) | (NaN,NaN) | (NaN,NaN) - (5.1,34.5) | (10,10) | (-4.9,24.5) - (-5,-12) | (0,0) | (-5,-12) - (-5,-12) | (-10,0) | (5,-12) - (-5,-12) | (-3,4) | (-2,-16) - (-5,-12) | (5.1,34.5) | (-10.1,-46.5) - (-5,-12) | (-5,-12) | (0,0) - (-5,-12) | (1e-300,-1e-300) | (-5,-12) - (-5,-12) | (1e+300,Infinity) | (-1e+300,-Infinity) - (-5,-12) | (NaN,NaN) | (NaN,NaN) - (-5,-12) | (10,10) | (-15,-22) - (1e-300,-1e-300) | (0,0) | (1e-300,-1e-300) - (1e-300,-1e-300) | (-10,0) | (10,-1e-300) - (1e-300,-1e-300) | (-3,4) | (3,-4) - (1e-300,-1e-300) | (5.1,34.5) | (-5.1,-34.5) - (1e-300,-1e-300) | (-5,-12) | (5,12) - (1e-300,-1e-300) | (1e-300,-1e-300) | (0,0) - (1e-300,-1e-300) | (1e+300,Infinity) | (-1e+300,-Infinity) - (1e-300,-1e-300) | (NaN,NaN) | (NaN,NaN) - (1e-300,-1e-300) | (10,10) | (-10,-10) - (1e+300,Infinity) | (0,0) | (1e+300,Infinity) - (1e+300,Infinity) | (-10,0) | (1e+300,Infinity) - (1e+300,Infinity) | (-3,4) | (1e+300,Infinity) - (1e+300,Infinity) | (5.1,34.5) | (1e+300,Infinity) - (1e+300,Infinity) | (-5,-12) | (1e+300,Infinity) - (1e+300,Infinity) | (1e-300,-1e-300) | (1e+300,Infinity) - (1e+300,Infinity) | (1e+300,Infinity) | (0,NaN) - (1e+300,Infinity) | (NaN,NaN) | (NaN,NaN) - (1e+300,Infinity) | (10,10) | (1e+300,Infinity) - (NaN,NaN) | (0,0) | (NaN,NaN) - (NaN,NaN) | (-10,0) | (NaN,NaN) - (NaN,NaN) | (-3,4) | (NaN,NaN) - (NaN,NaN) | (5.1,34.5) | (NaN,NaN) - (NaN,NaN) | (-5,-12) | (NaN,NaN) - (NaN,NaN) | (1e-300,-1e-300) | (NaN,NaN) - (NaN,NaN) | (1e+300,Infinity) | (NaN,NaN) - (NaN,NaN) | (NaN,NaN) | (NaN,NaN) - (NaN,NaN) | (10,10) | (NaN,NaN) - (10,10) | (0,0) | (10,10) - (10,10) | (-10,0) | (20,10) - (10,10) | (-3,4) | (13,6) - (10,10) | (5.1,34.5) | (4.9,-24.5) - (10,10) | (-5,-12) | (15,22) - (10,10) | (1e-300,-1e-300) | (10,10) - (10,10) | (1e+300,Infinity) | (-1e+300,-Infinity) - (10,10) | (NaN,NaN) | (NaN,NaN) - (10,10) | (10,10) | (0,0) -(81 rows) - --- Multiply with point -SELECT p1.f1, p2.f1, p1.f1 * p2.f1 FROM POINT_TBL p1, POINT_TBL p2 WHERE p1.f1[0] BETWEEN 1 AND 1000; - f1 | f1 | ?column? -------------+-------------------+----------------------- - (5.1,34.5) | (0,0) | (0,0) - (10,10) | (0,0) | (0,0) - (5.1,34.5) | (-10,0) | (-51,-345) - (10,10) | (-10,0) | (-100,-100) - (5.1,34.5) | (-3,4) | (-153.3,-83.1) - (10,10) | (-3,4) | (-70,10) - (5.1,34.5) | (5.1,34.5) | (-1164.24,351.9) - (10,10) | (5.1,34.5) | (-294,396) - (5.1,34.5) | (-5,-12) | (388.5,-233.7) - (10,10) | (-5,-12) | (70,-170) - (5.1,34.5) | (1e-300,-1e-300) | (3.96e-299,2.94e-299) - (10,10) | (1e-300,-1e-300) | (2e-299,0) - (5.1,34.5) | (1e+300,Infinity) | (-Infinity,Infinity) - (10,10) | (1e+300,Infinity) | (-Infinity,Infinity) - (5.1,34.5) | (NaN,NaN) | (NaN,NaN) - (10,10) | (NaN,NaN) | (NaN,NaN) - (5.1,34.5) | (10,10) | (-294,396) - (10,10) | (10,10) | (0,200) -(18 rows) - --- Underflow error -SELECT p1.f1, p2.f1, p1.f1 * p2.f1 FROM POINT_TBL p1, POINT_TBL p2 WHERE p1.f1[0] < 1; -ERROR: value out of range: underflow --- Divide by point -SELECT p1.f1, p2.f1, p1.f1 / p2.f1 FROM POINT_TBL p1, POINT_TBL p2 WHERE p2.f1[0] BETWEEN 1 AND 1000; - f1 | f1 | ?column? --------------------+------------+------------------------------------------- - (0,0) | (5.1,34.5) | (0,0) - (0,0) | (10,10) | (0,0) - (-10,0) | (5.1,34.5) | (-0.0419318237877,0.283656455034) - (-10,0) | (10,10) | (-0.5,0.5) - (-3,4) | (5.1,34.5) | (0.100883034877,0.101869666025) - (-3,4) | (10,10) | (0.05,0.35) - (5.1,34.5) | (5.1,34.5) | (1,0) - (5.1,34.5) | (10,10) | (1.98,1.47) - (-5,-12) | (5.1,34.5) | (-0.361353657935,0.0915100389719) - (-5,-12) | (10,10) | (-0.85,-0.35) - (1e-300,-1e-300) | (5.1,34.5) | (-2.41724631247e-302,-3.25588278822e-302) - (1e-300,-1e-300) | (10,10) | (0,-1e-301) - (1e+300,Infinity) | (5.1,34.5) | (Infinity,Infinity) - (1e+300,Infinity) | (10,10) | (Infinity,Infinity) - (NaN,NaN) | (5.1,34.5) | (NaN,NaN) - (NaN,NaN) | (10,10) | (NaN,NaN) - (10,10) | (5.1,34.5) | (0.325588278822,-0.241724631247) - (10,10) | (10,10) | (1,0) -(18 rows) - --- Overflow error -SELECT p1.f1, p2.f1, p1.f1 / p2.f1 FROM POINT_TBL p1, POINT_TBL p2 WHERE p2.f1[0] > 1000; -ERROR: value out of range: overflow --- Division by 0 error -SELECT p1.f1, p2.f1, p1.f1 / p2.f1 FROM POINT_TBL p1, POINT_TBL p2 WHERE p2.f1 ~= '(0,0)'::point; -ERROR: division by zero --- Distance to line -SELECT p.f1, l.s, p.f1 <-> l.s FROM POINT_TBL p, LINE_TBL l; - f1 | s | ?column? --------------------+---------------------------------------+-------------------- - (0,0) | {0,-1,5} | 5 - (0,0) | {1,0,5} | 5 - (0,0) | {0,3,0} | 0 - (0,0) | {1,-1,0} | 0 - (0,0) | {-0.4,-1,-6} | 5.57086014531 - (0,0) | {-0.000184615384615,-1,15.3846153846} | 15.3846151224 - (0,0) | {3,NaN,5} | NaN - (0,0) | {NaN,NaN,NaN} | NaN - (0,0) | {0,-1,3} | 3 - (0,0) | {-1,0,3} | 3 - (-10,0) | {0,-1,5} | 5 - (-10,0) | {1,0,5} | 5 - (-10,0) | {0,3,0} | 0 - (-10,0) | {1,-1,0} | 7.07106781187 - (-10,0) | {-0.4,-1,-6} | 1.85695338177 - (-10,0) | {-0.000184615384615,-1,15.3846153846} | 15.3864612763 - (-10,0) | {3,NaN,5} | NaN - (-10,0) | {NaN,NaN,NaN} | NaN - (-10,0) | {0,-1,3} | 3 - (-10,0) | {-1,0,3} | 13 - (-3,4) | {0,-1,5} | 1 - (-3,4) | {1,0,5} | 2 - (-3,4) | {0,3,0} | 4 - (-3,4) | {1,-1,0} | 4.94974746831 - (-3,4) | {-0.4,-1,-6} | 8.17059487979 - (-3,4) | {-0.000184615384615,-1,15.3846153846} | 11.3851690368 - (-3,4) | {3,NaN,5} | NaN - (-3,4) | {NaN,NaN,NaN} | NaN - (-3,4) | {0,-1,3} | 1 - (-3,4) | {-1,0,3} | 6 - (5.1,34.5) | {0,-1,5} | 29.5 - (5.1,34.5) | {1,0,5} | 10.1 - (5.1,34.5) | {0,3,0} | 34.5 - (5.1,34.5) | {1,-1,0} | 20.7889393669 - (5.1,34.5) | {-0.4,-1,-6} | 39.4973984303 - (5.1,34.5) | {-0.000184615384615,-1,15.3846153846} | 19.1163258281 - (5.1,34.5) | {3,NaN,5} | NaN - (5.1,34.5) | {NaN,NaN,NaN} | NaN - (5.1,34.5) | {0,-1,3} | 31.5 - (5.1,34.5) | {-1,0,3} | 2.1 - (-5,-12) | {0,-1,5} | 17 - (-5,-12) | {1,0,5} | 0 - (-5,-12) | {0,3,0} | 12 - (-5,-12) | {1,-1,0} | 4.94974746831 - (-5,-12) | {-0.4,-1,-6} | 7.42781352708 - (-5,-12) | {-0.000184615384615,-1,15.3846153846} | 27.3855379948 - (-5,-12) | {3,NaN,5} | NaN - (-5,-12) | {NaN,NaN,NaN} | NaN - (-5,-12) | {0,-1,3} | 15 - (-5,-12) | {-1,0,3} | 8 - (1e-300,-1e-300) | {0,-1,5} | 5 - (1e-300,-1e-300) | {1,0,5} | 5 - (1e-300,-1e-300) | {0,3,0} | 1e-300 - (1e-300,-1e-300) | {1,-1,0} | 1.41421356237e-300 - (1e-300,-1e-300) | {-0.4,-1,-6} | 5.57086014531 - (1e-300,-1e-300) | {-0.000184615384615,-1,15.3846153846} | 15.3846151224 - (1e-300,-1e-300) | {3,NaN,5} | NaN - (1e-300,-1e-300) | {NaN,NaN,NaN} | NaN - (1e-300,-1e-300) | {0,-1,3} | 3 - (1e-300,-1e-300) | {-1,0,3} | 3 - (1e+300,Infinity) | {0,-1,5} | Infinity - (1e+300,Infinity) | {1,0,5} | NaN - (1e+300,Infinity) | {0,3,0} | Infinity - (1e+300,Infinity) | {1,-1,0} | Infinity - (1e+300,Infinity) | {-0.4,-1,-6} | Infinity - (1e+300,Infinity) | {-0.000184615384615,-1,15.3846153846} | Infinity - (1e+300,Infinity) | {3,NaN,5} | NaN - (1e+300,Infinity) | {NaN,NaN,NaN} | NaN - (1e+300,Infinity) | {0,-1,3} | Infinity - (1e+300,Infinity) | {-1,0,3} | NaN - (NaN,NaN) | {0,-1,5} | NaN - (NaN,NaN) | {1,0,5} | NaN - (NaN,NaN) | {0,3,0} | NaN - (NaN,NaN) | {1,-1,0} | NaN - (NaN,NaN) | {-0.4,-1,-6} | NaN - (NaN,NaN) | {-0.000184615384615,-1,15.3846153846} | NaN - (NaN,NaN) | {3,NaN,5} | NaN - (NaN,NaN) | {NaN,NaN,NaN} | NaN - (NaN,NaN) | {0,-1,3} | NaN - (NaN,NaN) | {-1,0,3} | NaN - (10,10) | {0,-1,5} | 5 - (10,10) | {1,0,5} | 15 - (10,10) | {0,3,0} | 10 - (10,10) | {1,-1,0} | 0 - (10,10) | {-0.4,-1,-6} | 18.5695338177 - (10,10) | {-0.000184615384615,-1,15.3846153846} | 5.38276913903 - (10,10) | {3,NaN,5} | NaN - (10,10) | {NaN,NaN,NaN} | NaN - (10,10) | {0,-1,3} | 7 - (10,10) | {-1,0,3} | 7 -(90 rows) - --- Distance to line segment -SELECT p.f1, l.s, p.f1 <-> l.s FROM POINT_TBL p, LSEG_TBL l; - f1 | s | ?column? --------------------+-------------------------------+-------------------- - (0,0) | [(1,2),(3,4)] | 2.2360679775 - (0,0) | [(0,0),(6,6)] | 0 - (0,0) | [(10,-10),(-3,-4)] | 4.88901207039 - (0,0) | [(-1000000,200),(300000,-40)] | 15.3846151224 - (0,0) | [(11,22),(33,44)] | 24.5967477525 - (0,0) | [(-10,2),(-10,3)] | 10.1980390272 - (0,0) | [(0,-20),(30,-20)] | 20 - (0,0) | [(NaN,1),(NaN,90)] | NaN - (-10,0) | [(1,2),(3,4)] | 11.1803398875 - (-10,0) | [(0,0),(6,6)] | 10 - (-10,0) | [(10,-10),(-3,-4)] | 8.0622577483 - (-10,0) | [(-1000000,200),(300000,-40)] | 15.3864612763 - (-10,0) | [(11,22),(33,44)] | 30.4138126515 - (-10,0) | [(-10,2),(-10,3)] | 2 - (-10,0) | [(0,-20),(30,-20)] | 22.360679775 - (-10,0) | [(NaN,1),(NaN,90)] | NaN - (-3,4) | [(1,2),(3,4)] | 4.472135955 - (-3,4) | [(0,0),(6,6)] | 4.94974746831 - (-3,4) | [(10,-10),(-3,-4)] | 8 - (-3,4) | [(-1000000,200),(300000,-40)] | 11.3851690367 - (-3,4) | [(11,22),(33,44)] | 22.803508502 - (-3,4) | [(-10,2),(-10,3)] | 7.07106781187 - (-3,4) | [(0,-20),(30,-20)] | 24.1867732449 - (-3,4) | [(NaN,1),(NaN,90)] | NaN - (5.1,34.5) | [(1,2),(3,4)] | 30.5722096028 - (5.1,34.5) | [(0,0),(6,6)] | 28.5142069853 - (5.1,34.5) | [(10,-10),(-3,-4)] | 39.3428519556 - (5.1,34.5) | [(-1000000,200),(300000,-40)] | 19.1163258281 - (5.1,34.5) | [(11,22),(33,44)] | 13.0107647738 - (5.1,34.5) | [(-10,2),(-10,3)] | 34.932220084 - (5.1,34.5) | [(0,-20),(30,-20)] | 54.5 - (5.1,34.5) | [(NaN,1),(NaN,90)] | NaN - (-5,-12) | [(1,2),(3,4)] | 15.2315462117 - (-5,-12) | [(0,0),(6,6)] | 13 - (-5,-12) | [(10,-10),(-3,-4)] | 8.10179143093 - (-5,-12) | [(-1000000,200),(300000,-40)] | 27.3855379949 - (-5,-12) | [(11,22),(33,44)] | 37.5765884561 - (-5,-12) | [(-10,2),(-10,3)] | 14.8660687473 - (-5,-12) | [(0,-20),(30,-20)] | 9.43398113206 - (-5,-12) | [(NaN,1),(NaN,90)] | NaN - (1e-300,-1e-300) | [(1,2),(3,4)] | 2.2360679775 - (1e-300,-1e-300) | [(0,0),(6,6)] | 1.41421356237e-300 - (1e-300,-1e-300) | [(10,-10),(-3,-4)] | 4.88901207039 - (1e-300,-1e-300) | [(-1000000,200),(300000,-40)] | 15.3846151224 - (1e-300,-1e-300) | [(11,22),(33,44)] | 24.5967477525 - (1e-300,-1e-300) | [(-10,2),(-10,3)] | 10.1980390272 - (1e-300,-1e-300) | [(0,-20),(30,-20)] | 20 - (1e-300,-1e-300) | [(NaN,1),(NaN,90)] | NaN - (1e+300,Infinity) | [(1,2),(3,4)] | Infinity - (1e+300,Infinity) | [(0,0),(6,6)] | Infinity - (1e+300,Infinity) | [(10,-10),(-3,-4)] | Infinity - (1e+300,Infinity) | [(-1000000,200),(300000,-40)] | Infinity - (1e+300,Infinity) | [(11,22),(33,44)] | Infinity - (1e+300,Infinity) | [(-10,2),(-10,3)] | Infinity - (1e+300,Infinity) | [(0,-20),(30,-20)] | Infinity - (1e+300,Infinity) | [(NaN,1),(NaN,90)] | Infinity - (NaN,NaN) | [(1,2),(3,4)] | NaN - (NaN,NaN) | [(0,0),(6,6)] | NaN - (NaN,NaN) | [(10,-10),(-3,-4)] | NaN - (NaN,NaN) | [(-1000000,200),(300000,-40)] | NaN - (NaN,NaN) | [(11,22),(33,44)] | NaN - (NaN,NaN) | [(-10,2),(-10,3)] | NaN - (NaN,NaN) | [(0,-20),(30,-20)] | NaN - (NaN,NaN) | [(NaN,1),(NaN,90)] | NaN - (10,10) | [(1,2),(3,4)] | 9.21954445729 - (10,10) | [(0,0),(6,6)] | 5.65685424949 - (10,10) | [(10,-10),(-3,-4)] | 18.15918769 - (10,10) | [(-1000000,200),(300000,-40)] | 5.38276913904 - (10,10) | [(11,22),(33,44)] | 12.0415945788 - (10,10) | [(-10,2),(-10,3)] | 21.1896201004 - (10,10) | [(0,-20),(30,-20)] | 30 - (10,10) | [(NaN,1),(NaN,90)] | NaN -(72 rows) - --- Distance to box -SELECT p.f1, b.f1, p.f1 <-> b.f1 FROM POINT_TBL p, BOX_TBL b; - f1 | f1 | ?column? --------------------+---------------------+-------------------- - (0,0) | (2,2),(0,0) | 0 - (0,0) | (3,3),(1,1) | 1.41421356237 - (0,0) | (-2,2),(-8,-10) | 2 - (0,0) | (2.5,3.5),(2.5,2.5) | 3.53553390593 - (0,0) | (3,3),(3,3) | 4.24264068712 - (-10,0) | (2,2),(0,0) | 10 - (-10,0) | (3,3),(1,1) | 11.0453610172 - (-10,0) | (-2,2),(-8,-10) | 2 - (-10,0) | (2.5,3.5),(2.5,2.5) | 12.747548784 - (-10,0) | (3,3),(3,3) | 13.3416640641 - (-3,4) | (2,2),(0,0) | 3.60555127546 - (-3,4) | (3,3),(1,1) | 4.12310562562 - (-3,4) | (-2,2),(-8,-10) | 2 - (-3,4) | (2.5,3.5),(2.5,2.5) | 5.52268050859 - (-3,4) | (3,3),(3,3) | 6.0827625303 - (5.1,34.5) | (2,2),(0,0) | 32.6475113906 - (5.1,34.5) | (3,3),(1,1) | 31.5699223946 - (5.1,34.5) | (-2,2),(-8,-10) | 33.2664996656 - (5.1,34.5) | (2.5,3.5),(2.5,2.5) | 31.108841187 - (5.1,34.5) | (3,3),(3,3) | 31.5699223946 - (-5,-12) | (2,2),(0,0) | 13 - (-5,-12) | (3,3),(1,1) | 14.3178210633 - (-5,-12) | (-2,2),(-8,-10) | 2 - (-5,-12) | (2.5,3.5),(2.5,2.5) | 16.3248277173 - (-5,-12) | (3,3),(3,3) | 17 - (1e-300,-1e-300) | (2,2),(0,0) | 1.41421356237e-300 - (1e-300,-1e-300) | (3,3),(1,1) | 1.41421356237 - (1e-300,-1e-300) | (-2,2),(-8,-10) | 2 - (1e-300,-1e-300) | (2.5,3.5),(2.5,2.5) | 3.53553390593 - (1e-300,-1e-300) | (3,3),(3,3) | 4.24264068712 - (1e+300,Infinity) | (2,2),(0,0) | Infinity - (1e+300,Infinity) | (3,3),(1,1) | Infinity - (1e+300,Infinity) | (-2,2),(-8,-10) | Infinity - (1e+300,Infinity) | (2.5,3.5),(2.5,2.5) | Infinity - (1e+300,Infinity) | (3,3),(3,3) | Infinity - (NaN,NaN) | (2,2),(0,0) | NaN - (NaN,NaN) | (3,3),(1,1) | NaN - (NaN,NaN) | (-2,2),(-8,-10) | NaN - (NaN,NaN) | (2.5,3.5),(2.5,2.5) | NaN - (NaN,NaN) | (3,3),(3,3) | NaN - (10,10) | (2,2),(0,0) | 11.313708499 - (10,10) | (3,3),(1,1) | 9.89949493661 - (10,10) | (-2,2),(-8,-10) | 14.4222051019 - (10,10) | (2.5,3.5),(2.5,2.5) | 9.92471662064 - (10,10) | (3,3),(3,3) | 9.89949493661 -(45 rows) - --- Distance to path -SELECT p.f1, p1.f1, p.f1 <-> p1.f1 FROM POINT_TBL p, PATH_TBL p1; - f1 | f1 | ?column? --------------------+---------------------------+-------------------- - (0,0) | [(1,2),(3,4)] | 2.2360679775 - (0,0) | ((1,2),(3,4)) | 2.2360679775 - (0,0) | [(0,0),(3,0),(4,5),(1,6)] | 0 - (0,0) | ((1,2),(3,4)) | 2.2360679775 - (0,0) | ((1,2),(3,4)) | 2.2360679775 - (0,0) | [(1,2),(3,4)] | 2.2360679775 - (0,0) | ((10,20)) | 22.360679775 - (0,0) | [(11,12),(13,14)] | 16.2788205961 - (0,0) | ((11,12),(13,14)) | 16.2788205961 - (-10,0) | [(1,2),(3,4)] | 11.1803398875 - (-10,0) | ((1,2),(3,4)) | 11.1803398875 - (-10,0) | [(0,0),(3,0),(4,5),(1,6)] | 10 - (-10,0) | ((1,2),(3,4)) | 11.1803398875 - (-10,0) | ((1,2),(3,4)) | 11.1803398875 - (-10,0) | [(1,2),(3,4)] | 11.1803398875 - (-10,0) | ((10,20)) | 28.2842712475 - (-10,0) | [(11,12),(13,14)] | 24.1867732449 - (-10,0) | ((11,12),(13,14)) | 24.1867732449 - (-3,4) | [(1,2),(3,4)] | 4.472135955 - (-3,4) | ((1,2),(3,4)) | 4.472135955 - (-3,4) | [(0,0),(3,0),(4,5),(1,6)] | 4.472135955 - (-3,4) | ((1,2),(3,4)) | 4.472135955 - (-3,4) | ((1,2),(3,4)) | 4.472135955 - (-3,4) | [(1,2),(3,4)] | 4.472135955 - (-3,4) | ((10,20)) | 20.6155281281 - (-3,4) | [(11,12),(13,14)] | 16.1245154966 - (-3,4) | ((11,12),(13,14)) | 16.1245154966 - (5.1,34.5) | [(1,2),(3,4)] | 30.5722096028 - (5.1,34.5) | ((1,2),(3,4)) | 30.5722096028 - (5.1,34.5) | [(0,0),(3,0),(4,5),(1,6)] | 28.793402022 - (5.1,34.5) | ((1,2),(3,4)) | 30.5722096028 - (5.1,34.5) | ((1,2),(3,4)) | 30.5722096028 - (5.1,34.5) | [(1,2),(3,4)] | 30.5722096028 - (5.1,34.5) | ((10,20)) | 15.3055545473 - (5.1,34.5) | [(11,12),(13,14)] | 21.9695243462 - (5.1,34.5) | ((11,12),(13,14)) | 21.9695243462 - (-5,-12) | [(1,2),(3,4)] | 15.2315462117 - (-5,-12) | ((1,2),(3,4)) | 15.2315462117 - (-5,-12) | [(0,0),(3,0),(4,5),(1,6)] | 13 - (-5,-12) | ((1,2),(3,4)) | 15.2315462117 - (-5,-12) | ((1,2),(3,4)) | 15.2315462117 - (-5,-12) | [(1,2),(3,4)] | 15.2315462117 - (-5,-12) | ((10,20)) | 35.3411940941 - (-5,-12) | [(11,12),(13,14)] | 28.8444102037 - (-5,-12) | ((11,12),(13,14)) | 28.8444102037 - (1e-300,-1e-300) | [(1,2),(3,4)] | 2.2360679775 - (1e-300,-1e-300) | ((1,2),(3,4)) | 2.2360679775 - (1e-300,-1e-300) | [(0,0),(3,0),(4,5),(1,6)] | 1.41421356237e-300 - (1e-300,-1e-300) | ((1,2),(3,4)) | 2.2360679775 - (1e-300,-1e-300) | ((1,2),(3,4)) | 2.2360679775 - (1e-300,-1e-300) | [(1,2),(3,4)] | 2.2360679775 - (1e-300,-1e-300) | ((10,20)) | 22.360679775 - (1e-300,-1e-300) | [(11,12),(13,14)] | 16.2788205961 - (1e-300,-1e-300) | ((11,12),(13,14)) | 16.2788205961 - (1e+300,Infinity) | [(1,2),(3,4)] | Infinity - (1e+300,Infinity) | ((1,2),(3,4)) | Infinity - (1e+300,Infinity) | [(0,0),(3,0),(4,5),(1,6)] | Infinity - (1e+300,Infinity) | ((1,2),(3,4)) | Infinity - (1e+300,Infinity) | ((1,2),(3,4)) | Infinity - (1e+300,Infinity) | [(1,2),(3,4)] | Infinity - (1e+300,Infinity) | ((10,20)) | Infinity - (1e+300,Infinity) | [(11,12),(13,14)] | Infinity - (1e+300,Infinity) | ((11,12),(13,14)) | Infinity - (NaN,NaN) | [(1,2),(3,4)] | NaN - (NaN,NaN) | ((1,2),(3,4)) | NaN - (NaN,NaN) | [(0,0),(3,0),(4,5),(1,6)] | NaN - (NaN,NaN) | ((1,2),(3,4)) | NaN - (NaN,NaN) | ((1,2),(3,4)) | NaN - (NaN,NaN) | [(1,2),(3,4)] | NaN - (NaN,NaN) | ((10,20)) | NaN - (NaN,NaN) | [(11,12),(13,14)] | NaN - (NaN,NaN) | ((11,12),(13,14)) | NaN - (10,10) | [(1,2),(3,4)] | 9.21954445729 - (10,10) | ((1,2),(3,4)) | 9.21954445729 - (10,10) | [(0,0),(3,0),(4,5),(1,6)] | 7.81024967591 - (10,10) | ((1,2),(3,4)) | 9.21954445729 - (10,10) | ((1,2),(3,4)) | 9.21954445729 - (10,10) | [(1,2),(3,4)] | 9.21954445729 - (10,10) | ((10,20)) | 10 - (10,10) | [(11,12),(13,14)] | 2.2360679775 - (10,10) | ((11,12),(13,14)) | 2.2360679775 -(81 rows) - --- Distance to polygon -SELECT p.f1, p1.f1, p.f1 <-> p1.f1 FROM POINT_TBL p, POLYGON_TBL p1; - f1 | f1 | ?column? --------------------+----------------------------+--------------- - (0,0) | ((2,0),(2,4),(0,0)) | 0 - (0,0) | ((3,1),(3,3),(1,0)) | 1 - (0,0) | ((1,2),(3,4),(5,6),(7,8)) | 2.2360679775 - (0,0) | ((7,8),(5,6),(3,4),(1,2)) | 2.2360679775 - (0,0) | ((1,2),(7,8),(5,6),(3,-4)) | 1.58113883008 - (0,0) | ((0,0)) | 0 - (0,0) | ((0,1),(0,1)) | 1 - (-10,0) | ((2,0),(2,4),(0,0)) | 10 - (-10,0) | ((3,1),(3,3),(1,0)) | 11 - (-10,0) | ((1,2),(3,4),(5,6),(7,8)) | 11.1803398875 - (-10,0) | ((7,8),(5,6),(3,4),(1,2)) | 11.1803398875 - (-10,0) | ((1,2),(7,8),(5,6),(3,-4)) | 11.1803398875 - (-10,0) | ((0,0)) | 10 - (-10,0) | ((0,1),(0,1)) | 10.0498756211 - (-3,4) | ((2,0),(2,4),(0,0)) | 4.472135955 - (-3,4) | ((3,1),(3,3),(1,0)) | 5.54700196225 - (-3,4) | ((1,2),(3,4),(5,6),(7,8)) | 4.472135955 - (-3,4) | ((7,8),(5,6),(3,4),(1,2)) | 4.472135955 - (-3,4) | ((1,2),(7,8),(5,6),(3,-4)) | 4.472135955 - (-3,4) | ((0,0)) | 5 - (-3,4) | ((0,1),(0,1)) | 4.24264068712 - (5.1,34.5) | ((2,0),(2,4),(0,0)) | 30.6571362002 - (5.1,34.5) | ((3,1),(3,3),(1,0)) | 31.5699223946 - (5.1,34.5) | ((1,2),(3,4),(5,6),(7,8)) | 26.5680258958 - (5.1,34.5) | ((7,8),(5,6),(3,4),(1,2)) | 26.5680258958 - (5.1,34.5) | ((1,2),(7,8),(5,6),(3,-4)) | 26.5680258958 - (5.1,34.5) | ((0,0)) | 34.8749193547 - (5.1,34.5) | ((0,1),(0,1)) | 33.8859853037 - (-5,-12) | ((2,0),(2,4),(0,0)) | 13 - (-5,-12) | ((3,1),(3,3),(1,0)) | 13.416407865 - (-5,-12) | ((1,2),(3,4),(5,6),(7,8)) | 15.2315462117 - (-5,-12) | ((7,8),(5,6),(3,4),(1,2)) | 15.2315462117 - (-5,-12) | ((1,2),(7,8),(5,6),(3,-4)) | 11.313708499 - (-5,-12) | ((0,0)) | 13 - (-5,-12) | ((0,1),(0,1)) | 13.9283882772 - (1e-300,-1e-300) | ((2,0),(2,4),(0,0)) | 0 - (1e-300,-1e-300) | ((3,1),(3,3),(1,0)) | 1 - (1e-300,-1e-300) | ((1,2),(3,4),(5,6),(7,8)) | 2.2360679775 - (1e-300,-1e-300) | ((7,8),(5,6),(3,4),(1,2)) | 2.2360679775 - (1e-300,-1e-300) | ((1,2),(7,8),(5,6),(3,-4)) | 1.58113883008 - (1e-300,-1e-300) | ((0,0)) | 0 - (1e-300,-1e-300) | ((0,1),(0,1)) | 1 - (1e+300,Infinity) | ((2,0),(2,4),(0,0)) | Infinity - (1e+300,Infinity) | ((3,1),(3,3),(1,0)) | Infinity - (1e+300,Infinity) | ((1,2),(3,4),(5,6),(7,8)) | Infinity - (1e+300,Infinity) | ((7,8),(5,6),(3,4),(1,2)) | Infinity - (1e+300,Infinity) | ((1,2),(7,8),(5,6),(3,-4)) | Infinity - (1e+300,Infinity) | ((0,0)) | Infinity - (1e+300,Infinity) | ((0,1),(0,1)) | Infinity - (NaN,NaN) | ((2,0),(2,4),(0,0)) | 0 - (NaN,NaN) | ((3,1),(3,3),(1,0)) | 0 - (NaN,NaN) | ((1,2),(3,4),(5,6),(7,8)) | 0 - (NaN,NaN) | ((7,8),(5,6),(3,4),(1,2)) | 0 - (NaN,NaN) | ((1,2),(7,8),(5,6),(3,-4)) | 0 - (NaN,NaN) | ((0,0)) | 0 - (NaN,NaN) | ((0,1),(0,1)) | 0 - (10,10) | ((2,0),(2,4),(0,0)) | 10 - (10,10) | ((3,1),(3,3),(1,0)) | 9.89949493661 - (10,10) | ((1,2),(3,4),(5,6),(7,8)) | 3.60555127546 - (10,10) | ((7,8),(5,6),(3,4),(1,2)) | 3.60555127546 - (10,10) | ((1,2),(7,8),(5,6),(3,-4)) | 3.60555127546 - (10,10) | ((0,0)) | 14.1421356237 - (10,10) | ((0,1),(0,1)) | 13.4536240471 -(63 rows) - --- Closest point to line -SELECT p.f1, l.s, p.f1 ## l.s FROM POINT_TBL p, LINE_TBL l; - f1 | s | ?column? --------------------+---------------------------------------+---------------------------------- - (0,0) | {0,-1,5} | (0,5) - (0,0) | {1,0,5} | (-5,0) - (0,0) | {0,3,0} | (0,0) - (0,0) | {1,-1,0} | (0,0) - (0,0) | {-0.4,-1,-6} | (-2.06896551724,-5.1724137931) - (0,0) | {-0.000184615384615,-1,15.3846153846} | (0.00284023658959,15.3846148603) - (0,0) | {3,NaN,5} | - (0,0) | {NaN,NaN,NaN} | - (0,0) | {0,-1,3} | (0,3) - (0,0) | {-1,0,3} | (3,0) - (-10,0) | {0,-1,5} | (-10,5) - (-10,0) | {1,0,5} | (-5,0) - (-10,0) | {0,3,0} | (-10,0) - (-10,0) | {1,-1,0} | (-5,-5) - (-10,0) | {-0.4,-1,-6} | (-10.6896551724,-1.72413793103) - (-10,0) | {-0.000184615384615,-1,15.3846153846} | (-9.99715942258,15.386461014) - (-10,0) | {3,NaN,5} | - (-10,0) | {NaN,NaN,NaN} | - (-10,0) | {0,-1,3} | (-10,3) - (-10,0) | {-1,0,3} | (3,0) - (-3,4) | {0,-1,5} | (-3,5) - (-3,4) | {1,0,5} | (-5,4) - (-3,4) | {0,3,0} | (-3,0) - (-3,4) | {1,-1,0} | (0.5,0.5) - (-3,4) | {-0.4,-1,-6} | (-6.03448275862,-3.58620689655) - (-3,4) | {-0.000184615384615,-1,15.3846153846} | (-2.99789812268,15.3851688427) - (-3,4) | {3,NaN,5} | - (-3,4) | {NaN,NaN,NaN} | - (-3,4) | {0,-1,3} | (-3,3) - (-3,4) | {-1,0,3} | (3,4) - (5.1,34.5) | {0,-1,5} | (5.1,5) - (5.1,34.5) | {1,0,5} | (-5,34.5) - (5.1,34.5) | {0,3,0} | (5.1,0) - (5.1,34.5) | {1,-1,0} | (19.8,19.8) - (5.1,34.5) | {-0.4,-1,-6} | (-9.56896551724,-2.1724137931) - (5.1,34.5) | {-0.000184615384615,-1,15.3846153846} | (5.09647083221,15.3836744977) - (5.1,34.5) | {3,NaN,5} | - (5.1,34.5) | {NaN,NaN,NaN} | - (5.1,34.5) | {0,-1,3} | (5.1,3) - (5.1,34.5) | {-1,0,3} | (3,34.5) - (-5,-12) | {0,-1,5} | (-5,5) - (-5,-12) | {1,0,5} | (-5,-12) - (-5,-12) | {0,3,0} | (-5,0) - (-5,-12) | {1,-1,0} | (-8.5,-8.5) - (-5,-12) | {-0.4,-1,-6} | (-2.24137931034,-5.10344827586) - (-5,-12) | {-0.000184615384615,-1,15.3846153846} | (-4.99494420846,15.3855375282) - (-5,-12) | {3,NaN,5} | - (-5,-12) | {NaN,NaN,NaN} | - (-5,-12) | {0,-1,3} | (-5,3) - (-5,-12) | {-1,0,3} | (3,-12) - (1e-300,-1e-300) | {0,-1,5} | (1e-300,5) - (1e-300,-1e-300) | {1,0,5} | (-5,-1e-300) - (1e-300,-1e-300) | {0,3,0} | (1e-300,0) - (1e-300,-1e-300) | {1,-1,0} | (0,0) - (1e-300,-1e-300) | {-0.4,-1,-6} | (-2.06896551724,-5.1724137931) - (1e-300,-1e-300) | {-0.000184615384615,-1,15.3846153846} | (0.00284023658959,15.3846148603) - (1e-300,-1e-300) | {3,NaN,5} | - (1e-300,-1e-300) | {NaN,NaN,NaN} | - (1e-300,-1e-300) | {0,-1,3} | (1e-300,3) - (1e-300,-1e-300) | {-1,0,3} | (3,-1e-300) - (1e+300,Infinity) | {0,-1,5} | (1e+300,5) - (1e+300,Infinity) | {1,0,5} | - (1e+300,Infinity) | {0,3,0} | (1e+300,0) - (1e+300,Infinity) | {1,-1,0} | (Infinity,NaN) - (1e+300,Infinity) | {-0.4,-1,-6} | (-Infinity,NaN) - (1e+300,Infinity) | {-0.000184615384615,-1,15.3846153846} | (-Infinity,NaN) - (1e+300,Infinity) | {3,NaN,5} | - (1e+300,Infinity) | {NaN,NaN,NaN} | - (1e+300,Infinity) | {0,-1,3} | (1e+300,3) - (1e+300,Infinity) | {-1,0,3} | - (NaN,NaN) | {0,-1,5} | - (NaN,NaN) | {1,0,5} | - (NaN,NaN) | {0,3,0} | - (NaN,NaN) | {1,-1,0} | - (NaN,NaN) | {-0.4,-1,-6} | - (NaN,NaN) | {-0.000184615384615,-1,15.3846153846} | - (NaN,NaN) | {3,NaN,5} | - (NaN,NaN) | {NaN,NaN,NaN} | - (NaN,NaN) | {0,-1,3} | - (NaN,NaN) | {-1,0,3} | - (10,10) | {0,-1,5} | (10,5) - (10,10) | {1,0,5} | (-5,10) - (10,10) | {0,3,0} | (10,0) - (10,10) | {1,-1,0} | (10,10) - (10,10) | {-0.4,-1,-6} | (3.10344827586,-7.24137931034) - (10,10) | {-0.000184615384615,-1,15.3846153846} | (10.000993742,15.3827690473) - (10,10) | {3,NaN,5} | - (10,10) | {NaN,NaN,NaN} | - (10,10) | {0,-1,3} | (10,3) - (10,10) | {-1,0,3} | (3,10) -(90 rows) - --- Closest point to line segment -SELECT p.f1, l.s, p.f1 ## l.s FROM POINT_TBL p, LSEG_TBL l; - f1 | s | ?column? --------------------+-------------------------------+---------------------------------- - (0,0) | [(1,2),(3,4)] | (1,2) - (0,0) | [(0,0),(6,6)] | (0,0) - (0,0) | [(10,-10),(-3,-4)] | (-2.0487804878,-4.43902439024) - (0,0) | [(-1000000,200),(300000,-40)] | (0.00284023658959,15.3846148603) - (0,0) | [(11,22),(33,44)] | (11,22) - (0,0) | [(-10,2),(-10,3)] | (-10,2) - (0,0) | [(0,-20),(30,-20)] | (0,-20) - (0,0) | [(NaN,1),(NaN,90)] | - (-10,0) | [(1,2),(3,4)] | (1,2) - (-10,0) | [(0,0),(6,6)] | (0,0) - (-10,0) | [(10,-10),(-3,-4)] | (-3,-4) - (-10,0) | [(-1000000,200),(300000,-40)] | (-9.99715942258,15.386461014) - (-10,0) | [(11,22),(33,44)] | (11,22) - (-10,0) | [(-10,2),(-10,3)] | (-10,2) - (-10,0) | [(0,-20),(30,-20)] | (0,-20) - (-10,0) | [(NaN,1),(NaN,90)] | - (-3,4) | [(1,2),(3,4)] | (1,2) - (-3,4) | [(0,0),(6,6)] | (0.5,0.5) - (-3,4) | [(10,-10),(-3,-4)] | (-3,-4) - (-3,4) | [(-1000000,200),(300000,-40)] | (-2.99789812268,15.3851688427) - (-3,4) | [(11,22),(33,44)] | (11,22) - (-3,4) | [(-10,2),(-10,3)] | (-10,3) - (-3,4) | [(0,-20),(30,-20)] | (0,-20) - (-3,4) | [(NaN,1),(NaN,90)] | - (5.1,34.5) | [(1,2),(3,4)] | (3,4) - (5.1,34.5) | [(0,0),(6,6)] | (6,6) - (5.1,34.5) | [(10,-10),(-3,-4)] | (-3,-4) - (5.1,34.5) | [(-1000000,200),(300000,-40)] | (5.09647083221,15.3836744977) - (5.1,34.5) | [(11,22),(33,44)] | (14.3,25.3) - (5.1,34.5) | [(-10,2),(-10,3)] | (-10,3) - (5.1,34.5) | [(0,-20),(30,-20)] | (5.1,-20) - (5.1,34.5) | [(NaN,1),(NaN,90)] | - (-5,-12) | [(1,2),(3,4)] | (1,2) - (-5,-12) | [(0,0),(6,6)] | (0,0) - (-5,-12) | [(10,-10),(-3,-4)] | (-1.60487804878,-4.64390243902) - (-5,-12) | [(-1000000,200),(300000,-40)] | (-4.99494420846,15.3855375282) - (-5,-12) | [(11,22),(33,44)] | (11,22) - (-5,-12) | [(-10,2),(-10,3)] | (-10,2) - (-5,-12) | [(0,-20),(30,-20)] | (0,-20) - (-5,-12) | [(NaN,1),(NaN,90)] | - (1e-300,-1e-300) | [(1,2),(3,4)] | (1,2) - (1e-300,-1e-300) | [(0,0),(6,6)] | (0,0) - (1e-300,-1e-300) | [(10,-10),(-3,-4)] | (-2.0487804878,-4.43902439024) - (1e-300,-1e-300) | [(-1000000,200),(300000,-40)] | (0.00284023658959,15.3846148603) - (1e-300,-1e-300) | [(11,22),(33,44)] | (11,22) - (1e-300,-1e-300) | [(-10,2),(-10,3)] | (-10,2) - (1e-300,-1e-300) | [(0,-20),(30,-20)] | (0,-20) - (1e-300,-1e-300) | [(NaN,1),(NaN,90)] | - (1e+300,Infinity) | [(1,2),(3,4)] | (3,4) - (1e+300,Infinity) | [(0,0),(6,6)] | (6,6) - (1e+300,Infinity) | [(10,-10),(-3,-4)] | (-3,-4) - (1e+300,Infinity) | [(-1000000,200),(300000,-40)] | (300000,-40) - (1e+300,Infinity) | [(11,22),(33,44)] | (33,44) - (1e+300,Infinity) | [(-10,2),(-10,3)] | (-10,3) - (1e+300,Infinity) | [(0,-20),(30,-20)] | (30,-20) - (1e+300,Infinity) | [(NaN,1),(NaN,90)] | (NaN,90) - (NaN,NaN) | [(1,2),(3,4)] | - (NaN,NaN) | [(0,0),(6,6)] | - (NaN,NaN) | [(10,-10),(-3,-4)] | - (NaN,NaN) | [(-1000000,200),(300000,-40)] | - (NaN,NaN) | [(11,22),(33,44)] | - (NaN,NaN) | [(-10,2),(-10,3)] | - (NaN,NaN) | [(0,-20),(30,-20)] | - (NaN,NaN) | [(NaN,1),(NaN,90)] | - (10,10) | [(1,2),(3,4)] | (3,4) - (10,10) | [(0,0),(6,6)] | (6,6) - (10,10) | [(10,-10),(-3,-4)] | (2.39024390244,-6.48780487805) - (10,10) | [(-1000000,200),(300000,-40)] | (10.000993742,15.3827690473) - (10,10) | [(11,22),(33,44)] | (11,22) - (10,10) | [(-10,2),(-10,3)] | (-10,3) - (10,10) | [(0,-20),(30,-20)] | (10,-20) - (10,10) | [(NaN,1),(NaN,90)] | -(72 rows) - --- Closest point to box -SELECT p.f1, b.f1, p.f1 ## b.f1 FROM POINT_TBL p, BOX_TBL b; - f1 | f1 | ?column? --------------------+---------------------+-------------- - (0,0) | (2,2),(0,0) | (0,0) - (0,0) | (3,3),(1,1) | (1,1) - (0,0) | (-2,2),(-8,-10) | (-2,0) - (0,0) | (2.5,3.5),(2.5,2.5) | (2.5,2.5) - (0,0) | (3,3),(3,3) | (3,3) - (-10,0) | (2,2),(0,0) | (0,0) - (-10,0) | (3,3),(1,1) | (1,1) - (-10,0) | (-2,2),(-8,-10) | (-8,0) - (-10,0) | (2.5,3.5),(2.5,2.5) | (2.5,2.5) - (-10,0) | (3,3),(3,3) | (3,3) - (-3,4) | (2,2),(0,0) | (0,2) - (-3,4) | (3,3),(1,1) | (1,3) - (-3,4) | (-2,2),(-8,-10) | (-3,2) - (-3,4) | (2.5,3.5),(2.5,2.5) | (2.5,3.5) - (-3,4) | (3,3),(3,3) | (3,3) - (5.1,34.5) | (2,2),(0,0) | (2,2) - (5.1,34.5) | (3,3),(1,1) | (3,3) - (5.1,34.5) | (-2,2),(-8,-10) | (-2,2) - (5.1,34.5) | (2.5,3.5),(2.5,2.5) | (2.5,3.5) - (5.1,34.5) | (3,3),(3,3) | (3,3) - (-5,-12) | (2,2),(0,0) | (0,0) - (-5,-12) | (3,3),(1,1) | (1,1) - (-5,-12) | (-2,2),(-8,-10) | (-5,-10) - (-5,-12) | (2.5,3.5),(2.5,2.5) | (2.5,2.5) - (-5,-12) | (3,3),(3,3) | (3,3) - (1e-300,-1e-300) | (2,2),(0,0) | (0,0) - (1e-300,-1e-300) | (3,3),(1,1) | (1,1) - (1e-300,-1e-300) | (-2,2),(-8,-10) | (-2,-1e-300) - (1e-300,-1e-300) | (2.5,3.5),(2.5,2.5) | (2.5,2.5) - (1e-300,-1e-300) | (3,3),(3,3) | (3,3) - (1e+300,Infinity) | (2,2),(0,0) | (0,2) - (1e+300,Infinity) | (3,3),(1,1) | (1,3) - (1e+300,Infinity) | (-2,2),(-8,-10) | (-8,2) - (1e+300,Infinity) | (2.5,3.5),(2.5,2.5) | (2.5,3.5) - (1e+300,Infinity) | (3,3),(3,3) | (3,3) - (NaN,NaN) | (2,2),(0,0) | - (NaN,NaN) | (3,3),(1,1) | - (NaN,NaN) | (-2,2),(-8,-10) | - (NaN,NaN) | (2.5,3.5),(2.5,2.5) | - (NaN,NaN) | (3,3),(3,3) | - (10,10) | (2,2),(0,0) | (2,2) - (10,10) | (3,3),(1,1) | (3,3) - (10,10) | (-2,2),(-8,-10) | (-2,2) - (10,10) | (2.5,3.5),(2.5,2.5) | (2.5,3.5) - (10,10) | (3,3),(3,3) | (3,3) -(45 rows) - --- On line -SELECT p.f1, l.s FROM POINT_TBL p, LINE_TBL l WHERE p.f1 <@ l.s; - f1 | s -------------------+---------- - (0,0) | {0,3,0} - (0,0) | {1,-1,0} - (-10,0) | {0,3,0} - (-5,-12) | {1,0,5} - (1e-300,-1e-300) | {0,3,0} - (1e-300,-1e-300) | {1,-1,0} - (10,10) | {1,-1,0} -(7 rows) - --- On line segment -SELECT p.f1, l.s FROM POINT_TBL p, LSEG_TBL l WHERE p.f1 <@ l.s; - f1 | s -------------------+--------------- - (0,0) | [(0,0),(6,6)] - (1e-300,-1e-300) | [(0,0),(6,6)] -(2 rows) - --- On path -SELECT p.f1, p1.f1 FROM POINT_TBL p, PATH_TBL p1 WHERE p.f1 <@ p1.f1; - f1 | f1 -------------------+--------------------------- - (0,0) | [(0,0),(3,0),(4,5),(1,6)] - (1e-300,-1e-300) | [(0,0),(3,0),(4,5),(1,6)] - (NaN,NaN) | ((1,2),(3,4)) - (NaN,NaN) | ((1,2),(3,4)) - (NaN,NaN) | ((1,2),(3,4)) - (NaN,NaN) | ((10,20)) - (NaN,NaN) | ((11,12),(13,14)) -(7 rows) - --- --- Lines --- --- Vertical -SELECT s FROM LINE_TBL WHERE ?| s; - s ----------- - {1,0,5} - {-1,0,3} -(2 rows) - --- Horizontal -SELECT s FROM LINE_TBL WHERE ?- s; - s ----------- - {0,-1,5} - {0,3,0} - {0,-1,3} -(3 rows) - --- Same as line -SELECT l1.s, l2.s FROM LINE_TBL l1, LINE_TBL l2 WHERE l1.s = l2.s; - s | s ----------------------------------------+--------------------------------------- - {0,-1,5} | {0,-1,5} - {1,0,5} | {1,0,5} - {0,3,0} | {0,3,0} - {1,-1,0} | {1,-1,0} - {-0.4,-1,-6} | {-0.4,-1,-6} - {-0.000184615384615,-1,15.3846153846} | {-0.000184615384615,-1,15.3846153846} - {3,NaN,5} | {3,NaN,5} - {NaN,NaN,NaN} | {NaN,NaN,NaN} - {0,-1,3} | {0,-1,3} - {-1,0,3} | {-1,0,3} -(10 rows) - --- Parallel to line -SELECT l1.s, l2.s FROM LINE_TBL l1, LINE_TBL l2 WHERE l1.s ?|| l2.s; - s | s ----------------------------------------+--------------------------------------- - {0,-1,5} | {0,-1,5} - {0,-1,5} | {0,3,0} - {0,-1,5} | {0,-1,3} - {1,0,5} | {1,0,5} - {1,0,5} | {-1,0,3} - {0,3,0} | {0,-1,5} - {0,3,0} | {0,3,0} - {0,3,0} | {0,-1,3} - {1,-1,0} | {1,-1,0} - {-0.4,-1,-6} | {-0.4,-1,-6} - {-0.000184615384615,-1,15.3846153846} | {-0.000184615384615,-1,15.3846153846} - {0,-1,3} | {0,-1,5} - {0,-1,3} | {0,3,0} - {0,-1,3} | {0,-1,3} - {-1,0,3} | {1,0,5} - {-1,0,3} | {-1,0,3} -(16 rows) - --- Perpendicular to line -SELECT l1.s, l2.s FROM LINE_TBL l1, LINE_TBL l2 WHERE l1.s ?-| l2.s; - s | s -----------+---------- - {0,-1,5} | {1,0,5} - {0,-1,5} | {-1,0,3} - {1,0,5} | {0,-1,5} - {1,0,5} | {0,3,0} - {1,0,5} | {0,-1,3} - {0,3,0} | {1,0,5} - {0,3,0} | {-1,0,3} - {0,-1,3} | {1,0,5} - {0,-1,3} | {-1,0,3} - {-1,0,3} | {0,-1,5} - {-1,0,3} | {0,3,0} - {-1,0,3} | {0,-1,3} -(12 rows) - --- Distance to line -SELECT l1.s, l2.s, l1.s <-> l2.s FROM LINE_TBL l1, LINE_TBL l2; - s | s | ?column? ----------------------------------------+---------------------------------------+---------- - {0,-1,5} | {0,-1,5} | 0 - {0,-1,5} | {1,0,5} | 0 - {0,-1,5} | {0,3,0} | 5 - {0,-1,5} | {1,-1,0} | 0 - {0,-1,5} | {-0.4,-1,-6} | 0 - {0,-1,5} | {-0.000184615384615,-1,15.3846153846} | 0 - {0,-1,5} | {3,NaN,5} | 0 - {0,-1,5} | {NaN,NaN,NaN} | 0 - {0,-1,5} | {0,-1,3} | 2 - {0,-1,5} | {-1,0,3} | 0 - {1,0,5} | {0,-1,5} | 0 - {1,0,5} | {1,0,5} | 0 - {1,0,5} | {0,3,0} | 0 - {1,0,5} | {1,-1,0} | 0 - {1,0,5} | {-0.4,-1,-6} | 0 - {1,0,5} | {-0.000184615384615,-1,15.3846153846} | 0 - {1,0,5} | {3,NaN,5} | 0 - {1,0,5} | {NaN,NaN,NaN} | 0 - {1,0,5} | {0,-1,3} | 0 - {1,0,5} | {-1,0,3} | 8 - {0,3,0} | {0,-1,5} | 5 - {0,3,0} | {1,0,5} | 0 - {0,3,0} | {0,3,0} | 0 - {0,3,0} | {1,-1,0} | 0 - {0,3,0} | {-0.4,-1,-6} | 0 - {0,3,0} | {-0.000184615384615,-1,15.3846153846} | 0 - {0,3,0} | {3,NaN,5} | 0 - {0,3,0} | {NaN,NaN,NaN} | 0 - {0,3,0} | {0,-1,3} | 3 - {0,3,0} | {-1,0,3} | 0 - {1,-1,0} | {0,-1,5} | 0 - {1,-1,0} | {1,0,5} | 0 - {1,-1,0} | {0,3,0} | 0 - {1,-1,0} | {1,-1,0} | 0 - {1,-1,0} | {-0.4,-1,-6} | 0 - {1,-1,0} | {-0.000184615384615,-1,15.3846153846} | 0 - {1,-1,0} | {3,NaN,5} | 0 - {1,-1,0} | {NaN,NaN,NaN} | 0 - {1,-1,0} | {0,-1,3} | 0 - {1,-1,0} | {-1,0,3} | 0 - {-0.4,-1,-6} | {0,-1,5} | 0 - {-0.4,-1,-6} | {1,0,5} | 0 - {-0.4,-1,-6} | {0,3,0} | 0 - {-0.4,-1,-6} | {1,-1,0} | 0 - {-0.4,-1,-6} | {-0.4,-1,-6} | 0 - {-0.4,-1,-6} | {-0.000184615384615,-1,15.3846153846} | 0 - {-0.4,-1,-6} | {3,NaN,5} | 0 - {-0.4,-1,-6} | {NaN,NaN,NaN} | 0 - {-0.4,-1,-6} | {0,-1,3} | 0 - {-0.4,-1,-6} | {-1,0,3} | 0 - {-0.000184615384615,-1,15.3846153846} | {0,-1,5} | 0 - {-0.000184615384615,-1,15.3846153846} | {1,0,5} | 0 - {-0.000184615384615,-1,15.3846153846} | {0,3,0} | 0 - {-0.000184615384615,-1,15.3846153846} | {1,-1,0} | 0 - {-0.000184615384615,-1,15.3846153846} | {-0.4,-1,-6} | 0 - {-0.000184615384615,-1,15.3846153846} | {-0.000184615384615,-1,15.3846153846} | 0 - {-0.000184615384615,-1,15.3846153846} | {3,NaN,5} | 0 - {-0.000184615384615,-1,15.3846153846} | {NaN,NaN,NaN} | 0 - {-0.000184615384615,-1,15.3846153846} | {0,-1,3} | 0 - {-0.000184615384615,-1,15.3846153846} | {-1,0,3} | 0 - {3,NaN,5} | {0,-1,5} | 0 - {3,NaN,5} | {1,0,5} | 0 - {3,NaN,5} | {0,3,0} | 0 - {3,NaN,5} | {1,-1,0} | 0 - {3,NaN,5} | {-0.4,-1,-6} | 0 - {3,NaN,5} | {-0.000184615384615,-1,15.3846153846} | 0 - {3,NaN,5} | {3,NaN,5} | 0 - {3,NaN,5} | {NaN,NaN,NaN} | 0 - {3,NaN,5} | {0,-1,3} | 0 - {3,NaN,5} | {-1,0,3} | 0 - {NaN,NaN,NaN} | {0,-1,5} | 0 - {NaN,NaN,NaN} | {1,0,5} | 0 - {NaN,NaN,NaN} | {0,3,0} | 0 - {NaN,NaN,NaN} | {1,-1,0} | 0 - {NaN,NaN,NaN} | {-0.4,-1,-6} | 0 - {NaN,NaN,NaN} | {-0.000184615384615,-1,15.3846153846} | 0 - {NaN,NaN,NaN} | {3,NaN,5} | 0 - {NaN,NaN,NaN} | {NaN,NaN,NaN} | 0 - {NaN,NaN,NaN} | {0,-1,3} | 0 - {NaN,NaN,NaN} | {-1,0,3} | 0 - {0,-1,3} | {0,-1,5} | 2 - {0,-1,3} | {1,0,5} | 0 - {0,-1,3} | {0,3,0} | 3 - {0,-1,3} | {1,-1,0} | 0 - {0,-1,3} | {-0.4,-1,-6} | 0 - {0,-1,3} | {-0.000184615384615,-1,15.3846153846} | 0 - {0,-1,3} | {3,NaN,5} | 0 - {0,-1,3} | {NaN,NaN,NaN} | 0 - {0,-1,3} | {0,-1,3} | 0 - {0,-1,3} | {-1,0,3} | 0 - {-1,0,3} | {0,-1,5} | 0 - {-1,0,3} | {1,0,5} | 8 - {-1,0,3} | {0,3,0} | 0 - {-1,0,3} | {1,-1,0} | 0 - {-1,0,3} | {-0.4,-1,-6} | 0 - {-1,0,3} | {-0.000184615384615,-1,15.3846153846} | 0 - {-1,0,3} | {3,NaN,5} | 0 - {-1,0,3} | {NaN,NaN,NaN} | 0 - {-1,0,3} | {0,-1,3} | 0 - {-1,0,3} | {-1,0,3} | 0 -(100 rows) - --- Distance to box -SELECT l.s, b.f1, l.s <-> b.f1 FROM LINE_TBL l, BOX_TBL b; -ERROR: function "dist_lb" not implemented --- Intersect with line -SELECT l1.s, l2.s FROM LINE_TBL l1, LINE_TBL l2 WHERE l1.s ?# l2.s; - s | s ----------------------------------------+--------------------------------------- - {0,-1,5} | {1,0,5} - {0,-1,5} | {1,-1,0} - {0,-1,5} | {-0.4,-1,-6} - {0,-1,5} | {-0.000184615384615,-1,15.3846153846} - {0,-1,5} | {3,NaN,5} - {0,-1,5} | {NaN,NaN,NaN} - {0,-1,5} | {-1,0,3} - {1,0,5} | {0,-1,5} - {1,0,5} | {0,3,0} - {1,0,5} | {1,-1,0} - {1,0,5} | {-0.4,-1,-6} - {1,0,5} | {-0.000184615384615,-1,15.3846153846} - {1,0,5} | {3,NaN,5} - {1,0,5} | {NaN,NaN,NaN} - {1,0,5} | {0,-1,3} - {0,3,0} | {1,0,5} - {0,3,0} | {1,-1,0} - {0,3,0} | {-0.4,-1,-6} - {0,3,0} | {-0.000184615384615,-1,15.3846153846} - {0,3,0} | {3,NaN,5} - {0,3,0} | {NaN,NaN,NaN} - {0,3,0} | {-1,0,3} - {1,-1,0} | {0,-1,5} - {1,-1,0} | {1,0,5} - {1,-1,0} | {0,3,0} - {1,-1,0} | {-0.4,-1,-6} - {1,-1,0} | {-0.000184615384615,-1,15.3846153846} - {1,-1,0} | {3,NaN,5} - {1,-1,0} | {NaN,NaN,NaN} - {1,-1,0} | {0,-1,3} - {1,-1,0} | {-1,0,3} - {-0.4,-1,-6} | {0,-1,5} - {-0.4,-1,-6} | {1,0,5} - {-0.4,-1,-6} | {0,3,0} - {-0.4,-1,-6} | {1,-1,0} - {-0.4,-1,-6} | {-0.000184615384615,-1,15.3846153846} - {-0.4,-1,-6} | {3,NaN,5} - {-0.4,-1,-6} | {NaN,NaN,NaN} - {-0.4,-1,-6} | {0,-1,3} - {-0.4,-1,-6} | {-1,0,3} - {-0.000184615384615,-1,15.3846153846} | {0,-1,5} - {-0.000184615384615,-1,15.3846153846} | {1,0,5} - {-0.000184615384615,-1,15.3846153846} | {0,3,0} - {-0.000184615384615,-1,15.3846153846} | {1,-1,0} - {-0.000184615384615,-1,15.3846153846} | {-0.4,-1,-6} - {-0.000184615384615,-1,15.3846153846} | {3,NaN,5} - {-0.000184615384615,-1,15.3846153846} | {NaN,NaN,NaN} - {-0.000184615384615,-1,15.3846153846} | {0,-1,3} - {-0.000184615384615,-1,15.3846153846} | {-1,0,3} - {3,NaN,5} | {0,-1,5} - {3,NaN,5} | {1,0,5} - {3,NaN,5} | {0,3,0} - {3,NaN,5} | {1,-1,0} - {3,NaN,5} | {-0.4,-1,-6} - {3,NaN,5} | {-0.000184615384615,-1,15.3846153846} - {3,NaN,5} | {3,NaN,5} - {3,NaN,5} | {NaN,NaN,NaN} - {3,NaN,5} | {0,-1,3} - {3,NaN,5} | {-1,0,3} - {NaN,NaN,NaN} | {0,-1,5} - {NaN,NaN,NaN} | {1,0,5} - {NaN,NaN,NaN} | {0,3,0} - {NaN,NaN,NaN} | {1,-1,0} - {NaN,NaN,NaN} | {-0.4,-1,-6} - {NaN,NaN,NaN} | {-0.000184615384615,-1,15.3846153846} - {NaN,NaN,NaN} | {3,NaN,5} - {NaN,NaN,NaN} | {NaN,NaN,NaN} - {NaN,NaN,NaN} | {0,-1,3} - {NaN,NaN,NaN} | {-1,0,3} - {0,-1,3} | {1,0,5} - {0,-1,3} | {1,-1,0} - {0,-1,3} | {-0.4,-1,-6} - {0,-1,3} | {-0.000184615384615,-1,15.3846153846} - {0,-1,3} | {3,NaN,5} - {0,-1,3} | {NaN,NaN,NaN} - {0,-1,3} | {-1,0,3} - {-1,0,3} | {0,-1,5} - {-1,0,3} | {0,3,0} - {-1,0,3} | {1,-1,0} - {-1,0,3} | {-0.4,-1,-6} - {-1,0,3} | {-0.000184615384615,-1,15.3846153846} - {-1,0,3} | {3,NaN,5} - {-1,0,3} | {NaN,NaN,NaN} - {-1,0,3} | {0,-1,3} -(84 rows) - --- Intersect with box -SELECT l.s, b.f1 FROM LINE_TBL l, BOX_TBL b WHERE l.s ?# b.f1; - s | f1 ---------------+--------------------- - {1,0,5} | (-2,2),(-8,-10) - {0,3,0} | (2,2),(0,0) - {0,3,0} | (-2,2),(-8,-10) - {1,-1,0} | (2,2),(0,0) - {1,-1,0} | (3,3),(1,1) - {1,-1,0} | (-2,2),(-8,-10) - {1,-1,0} | (2.5,3.5),(2.5,2.5) - {1,-1,0} | (3,3),(3,3) - {-0.4,-1,-6} | (-2,2),(-8,-10) - {0,-1,3} | (3,3),(1,1) - {0,-1,3} | (2.5,3.5),(2.5,2.5) - {0,-1,3} | (3,3),(3,3) - {-1,0,3} | (3,3),(1,1) -(13 rows) - --- Intersection point with line -SELECT l1.s, l2.s, l1.s # l2.s FROM LINE_TBL l1, LINE_TBL l2; - s | s | ?column? ----------------------------------------+---------------------------------------+------------------------------------ - {0,-1,5} | {0,-1,5} | - {0,-1,5} | {1,0,5} | (-5,5) - {0,-1,5} | {0,3,0} | - {0,-1,5} | {1,-1,0} | (5,5) - {0,-1,5} | {-0.4,-1,-6} | (-27.5,5) - {0,-1,5} | {-0.000184615384615,-1,15.3846153846} | (56250,5) - {0,-1,5} | {3,NaN,5} | (NaN,NaN) - {0,-1,5} | {NaN,NaN,NaN} | (NaN,NaN) - {0,-1,5} | {0,-1,3} | - {0,-1,5} | {-1,0,3} | (3,5) - {1,0,5} | {0,-1,5} | (-5,5) - {1,0,5} | {1,0,5} | - {1,0,5} | {0,3,0} | (-5,0) - {1,0,5} | {1,-1,0} | (-5,-5) - {1,0,5} | {-0.4,-1,-6} | (-5,-4) - {1,0,5} | {-0.000184615384615,-1,15.3846153846} | (-5,15.3855384615) - {1,0,5} | {3,NaN,5} | (NaN,NaN) - {1,0,5} | {NaN,NaN,NaN} | (NaN,NaN) - {1,0,5} | {0,-1,3} | (-5,3) - {1,0,5} | {-1,0,3} | - {0,3,0} | {0,-1,5} | - {0,3,0} | {1,0,5} | (-5,0) - {0,3,0} | {0,3,0} | - {0,3,0} | {1,-1,0} | (0,0) - {0,3,0} | {-0.4,-1,-6} | (-15,0) - {0,3,0} | {-0.000184615384615,-1,15.3846153846} | (83333.3333333,0) - {0,3,0} | {3,NaN,5} | (NaN,NaN) - {0,3,0} | {NaN,NaN,NaN} | (NaN,NaN) - {0,3,0} | {0,-1,3} | - {0,3,0} | {-1,0,3} | (3,0) - {1,-1,0} | {0,-1,5} | (5,5) - {1,-1,0} | {1,0,5} | (-5,-5) - {1,-1,0} | {0,3,0} | (0,0) - {1,-1,0} | {1,-1,0} | - {1,-1,0} | {-0.4,-1,-6} | (-4.28571428571,-4.28571428571) - {1,-1,0} | {-0.000184615384615,-1,15.3846153846} | (15.3817756722,15.3817756722) - {1,-1,0} | {3,NaN,5} | (NaN,NaN) - {1,-1,0} | {NaN,NaN,NaN} | (NaN,NaN) - {1,-1,0} | {0,-1,3} | (3,3) - {1,-1,0} | {-1,0,3} | (3,3) - {-0.4,-1,-6} | {0,-1,5} | (-27.5,5) - {-0.4,-1,-6} | {1,0,5} | (-5,-4) - {-0.4,-1,-6} | {0,3,0} | (-15,0) - {-0.4,-1,-6} | {1,-1,0} | (-4.28571428571,-4.28571428571) - {-0.4,-1,-6} | {-0.4,-1,-6} | - {-0.4,-1,-6} | {-0.000184615384615,-1,15.3846153846} | (-53.4862244113,15.3944897645) - {-0.4,-1,-6} | {3,NaN,5} | (NaN,NaN) - {-0.4,-1,-6} | {NaN,NaN,NaN} | (NaN,NaN) - {-0.4,-1,-6} | {0,-1,3} | (-22.5,3) - {-0.4,-1,-6} | {-1,0,3} | (3,-7.2) - {-0.000184615384615,-1,15.3846153846} | {0,-1,5} | (56250,5) - {-0.000184615384615,-1,15.3846153846} | {1,0,5} | (-5,15.3855384615) - {-0.000184615384615,-1,15.3846153846} | {0,3,0} | (83333.3333333,-1.7763568394e-015) - {-0.000184615384615,-1,15.3846153846} | {1,-1,0} | (15.3817756722,15.3817756722) - {-0.000184615384615,-1,15.3846153846} | {-0.4,-1,-6} | (-53.4862244113,15.3944897645) - {-0.000184615384615,-1,15.3846153846} | {-0.000184615384615,-1,15.3846153846} | - {-0.000184615384615,-1,15.3846153846} | {3,NaN,5} | (NaN,NaN) - {-0.000184615384615,-1,15.3846153846} | {NaN,NaN,NaN} | (NaN,NaN) - {-0.000184615384615,-1,15.3846153846} | {0,-1,3} | (67083.3333333,3) - {-0.000184615384615,-1,15.3846153846} | {-1,0,3} | (3,15.3840615385) - {3,NaN,5} | {0,-1,5} | (NaN,NaN) - {3,NaN,5} | {1,0,5} | (NaN,NaN) - {3,NaN,5} | {0,3,0} | (NaN,NaN) - {3,NaN,5} | {1,-1,0} | (NaN,NaN) - {3,NaN,5} | {-0.4,-1,-6} | (NaN,NaN) - {3,NaN,5} | {-0.000184615384615,-1,15.3846153846} | (NaN,NaN) - {3,NaN,5} | {3,NaN,5} | (NaN,NaN) - {3,NaN,5} | {NaN,NaN,NaN} | (NaN,NaN) - {3,NaN,5} | {0,-1,3} | (NaN,NaN) - {3,NaN,5} | {-1,0,3} | (NaN,NaN) - {NaN,NaN,NaN} | {0,-1,5} | (NaN,NaN) - {NaN,NaN,NaN} | {1,0,5} | (NaN,NaN) - {NaN,NaN,NaN} | {0,3,0} | (NaN,NaN) - {NaN,NaN,NaN} | {1,-1,0} | (NaN,NaN) - {NaN,NaN,NaN} | {-0.4,-1,-6} | (NaN,NaN) - {NaN,NaN,NaN} | {-0.000184615384615,-1,15.3846153846} | (NaN,NaN) - {NaN,NaN,NaN} | {3,NaN,5} | (NaN,NaN) - {NaN,NaN,NaN} | {NaN,NaN,NaN} | (NaN,NaN) - {NaN,NaN,NaN} | {0,-1,3} | (NaN,NaN) - {NaN,NaN,NaN} | {-1,0,3} | (NaN,NaN) - {0,-1,3} | {0,-1,5} | - {0,-1,3} | {1,0,5} | (-5,3) - {0,-1,3} | {0,3,0} | - {0,-1,3} | {1,-1,0} | (3,3) - {0,-1,3} | {-0.4,-1,-6} | (-22.5,3) - {0,-1,3} | {-0.000184615384615,-1,15.3846153846} | (67083.3333333,3) - {0,-1,3} | {3,NaN,5} | (NaN,NaN) - {0,-1,3} | {NaN,NaN,NaN} | (NaN,NaN) - {0,-1,3} | {0,-1,3} | - {0,-1,3} | {-1,0,3} | (3,3) - {-1,0,3} | {0,-1,5} | (3,5) - {-1,0,3} | {1,0,5} | - {-1,0,3} | {0,3,0} | (3,0) - {-1,0,3} | {1,-1,0} | (3,3) - {-1,0,3} | {-0.4,-1,-6} | (3,-7.2) - {-1,0,3} | {-0.000184615384615,-1,15.3846153846} | (3,15.3840615385) - {-1,0,3} | {3,NaN,5} | (NaN,NaN) - {-1,0,3} | {NaN,NaN,NaN} | (NaN,NaN) - {-1,0,3} | {0,-1,3} | (3,3) - {-1,0,3} | {-1,0,3} | -(100 rows) - --- Closest point to line segment -SELECT l.s, l1.s, l.s ## l1.s FROM LINE_TBL l, LSEG_TBL l1; - s | s | ?column? ----------------------------------------+-------------------------------+------------------------------------ - {0,-1,5} | [(1,2),(3,4)] | (3,4) - {0,-1,5} | [(0,0),(6,6)] | (5,5) - {0,-1,5} | [(10,-10),(-3,-4)] | (-3,-4) - {0,-1,5} | [(-1000000,200),(300000,-40)] | (56250,5) - {0,-1,5} | [(11,22),(33,44)] | (11,22) - {0,-1,5} | [(-10,2),(-10,3)] | (-10,3) - {0,-1,5} | [(0,-20),(30,-20)] | - {0,-1,5} | [(NaN,1),(NaN,90)] | - {1,0,5} | [(1,2),(3,4)] | (1,2) - {1,0,5} | [(0,0),(6,6)] | (0,0) - {1,0,5} | [(10,-10),(-3,-4)] | (-3,-4) - {1,0,5} | [(-1000000,200),(300000,-40)] | (-5,15.3855384615) - {1,0,5} | [(11,22),(33,44)] | (11,22) - {1,0,5} | [(-10,2),(-10,3)] | - {1,0,5} | [(0,-20),(30,-20)] | (0,-20) - {1,0,5} | [(NaN,1),(NaN,90)] | - {0,3,0} | [(1,2),(3,4)] | (1,2) - {0,3,0} | [(0,0),(6,6)] | (0,0) - {0,3,0} | [(10,-10),(-3,-4)] | (-3,-4) - {0,3,0} | [(-1000000,200),(300000,-40)] | (83333.3333333,-1.7763568394e-015) - {0,3,0} | [(11,22),(33,44)] | (11,22) - {0,3,0} | [(-10,2),(-10,3)] | (-10,2) - {0,3,0} | [(0,-20),(30,-20)] | - {0,3,0} | [(NaN,1),(NaN,90)] | - {1,-1,0} | [(1,2),(3,4)] | - {1,-1,0} | [(0,0),(6,6)] | - {1,-1,0} | [(10,-10),(-3,-4)] | (-3,-4) - {1,-1,0} | [(-1000000,200),(300000,-40)] | (15.3817756722,15.3817756722) - {1,-1,0} | [(11,22),(33,44)] | - {1,-1,0} | [(-10,2),(-10,3)] | (-10,2) - {1,-1,0} | [(0,-20),(30,-20)] | (0,-20) - {1,-1,0} | [(NaN,1),(NaN,90)] | - {-0.4,-1,-6} | [(1,2),(3,4)] | (1,2) - {-0.4,-1,-6} | [(0,0),(6,6)] | (0,0) - {-0.4,-1,-6} | [(10,-10),(-3,-4)] | (10,-10) - {-0.4,-1,-6} | [(-1000000,200),(300000,-40)] | (-53.4862244113,15.3944897645) - {-0.4,-1,-6} | [(11,22),(33,44)] | (11,22) - {-0.4,-1,-6} | [(-10,2),(-10,3)] | (-10,2) - {-0.4,-1,-6} | [(0,-20),(30,-20)] | (30,-20) - {-0.4,-1,-6} | [(NaN,1),(NaN,90)] | - {-0.000184615384615,-1,15.3846153846} | [(1,2),(3,4)] | (3,4) - {-0.000184615384615,-1,15.3846153846} | [(0,0),(6,6)] | (6,6) - {-0.000184615384615,-1,15.3846153846} | [(10,-10),(-3,-4)] | (-3,-4) - {-0.000184615384615,-1,15.3846153846} | [(-1000000,200),(300000,-40)] | - {-0.000184615384615,-1,15.3846153846} | [(11,22),(33,44)] | (11,22) - {-0.000184615384615,-1,15.3846153846} | [(-10,2),(-10,3)] | (-10,3) - {-0.000184615384615,-1,15.3846153846} | [(0,-20),(30,-20)] | (30,-20) - {-0.000184615384615,-1,15.3846153846} | [(NaN,1),(NaN,90)] | - {3,NaN,5} | [(1,2),(3,4)] | - {3,NaN,5} | [(0,0),(6,6)] | - {3,NaN,5} | [(10,-10),(-3,-4)] | - {3,NaN,5} | [(-1000000,200),(300000,-40)] | - {3,NaN,5} | [(11,22),(33,44)] | - {3,NaN,5} | [(-10,2),(-10,3)] | - {3,NaN,5} | [(0,-20),(30,-20)] | - {3,NaN,5} | [(NaN,1),(NaN,90)] | - {NaN,NaN,NaN} | [(1,2),(3,4)] | - {NaN,NaN,NaN} | [(0,0),(6,6)] | - {NaN,NaN,NaN} | [(10,-10),(-3,-4)] | - {NaN,NaN,NaN} | [(-1000000,200),(300000,-40)] | - {NaN,NaN,NaN} | [(11,22),(33,44)] | - {NaN,NaN,NaN} | [(-10,2),(-10,3)] | - {NaN,NaN,NaN} | [(0,-20),(30,-20)] | - {NaN,NaN,NaN} | [(NaN,1),(NaN,90)] | - {0,-1,3} | [(1,2),(3,4)] | (2,3) - {0,-1,3} | [(0,0),(6,6)] | (3,3) - {0,-1,3} | [(10,-10),(-3,-4)] | (-3,-4) - {0,-1,3} | [(-1000000,200),(300000,-40)] | (67083.3333333,3) - {0,-1,3} | [(11,22),(33,44)] | (11,22) - {0,-1,3} | [(-10,2),(-10,3)] | (-10,3) - {0,-1,3} | [(0,-20),(30,-20)] | - {0,-1,3} | [(NaN,1),(NaN,90)] | - {-1,0,3} | [(1,2),(3,4)] | (3,4) - {-1,0,3} | [(0,0),(6,6)] | (3,3) - {-1,0,3} | [(10,-10),(-3,-4)] | (3,-6.76923076923) - {-1,0,3} | [(-1000000,200),(300000,-40)] | (3,15.3840615385) - {-1,0,3} | [(11,22),(33,44)] | (11,22) - {-1,0,3} | [(-10,2),(-10,3)] | - {-1,0,3} | [(0,-20),(30,-20)] | (3,-20) - {-1,0,3} | [(NaN,1),(NaN,90)] | -(80 rows) - --- Closest point to box -SELECT l.s, b.f1, l.s ## b.f1 FROM LINE_TBL l, BOX_TBL b; -ERROR: function "close_lb" not implemented --- --- Line segments --- --- intersection -SELECT '' AS count, p.f1, l.s, l.s # p.f1 AS intersection - FROM LSEG_TBL l, POINT_TBL p; -ERROR: operator does not exist: lseg # point -LINE 1: SELECT '' AS count, p.f1, l.s, l.s # p.f1 AS intersection - ^ -HINT: No operator matches the given name and argument types. You might need to add explicit type casts. --- Length -SELECT s, @-@ s FROM LSEG_TBL; - s | ?column? --------------------------------+--------------- - [(1,2),(3,4)] | 2.82842712475 - [(0,0),(6,6)] | 8.48528137424 - [(10,-10),(-3,-4)] | 14.3178210633 - [(-1000000,200),(300000,-40)] | 1300000.02215 - [(11,22),(33,44)] | 31.1126983722 - [(-10,2),(-10,3)] | 1 - [(0,-20),(30,-20)] | 30 - [(NaN,1),(NaN,90)] | NaN -(8 rows) - --- Vertical -SELECT s FROM LSEG_TBL WHERE ?| s; - s -------------------- - [(-10,2),(-10,3)] -(1 row) - --- Horizontal -SELECT s FROM LSEG_TBL WHERE ?- s; - s --------------------- - [(0,-20),(30,-20)] -(1 row) - --- Center -SELECT s, @@ s FROM LSEG_TBL; - s | ?column? --------------------------------+-------------- - [(1,2),(3,4)] | (2,3) - [(0,0),(6,6)] | (3,3) - [(10,-10),(-3,-4)] | (3.5,-7) - [(-1000000,200),(300000,-40)] | (-350000,80) - [(11,22),(33,44)] | (22,33) - [(-10,2),(-10,3)] | (-10,2.5) - [(0,-20),(30,-20)] | (15,-20) - [(NaN,1),(NaN,90)] | (NaN,45.5) -(8 rows) - --- To point -SELECT s, s::point FROM LSEG_TBL; - s | s --------------------------------+-------------- - [(1,2),(3,4)] | (2,3) - [(0,0),(6,6)] | (3,3) - [(10,-10),(-3,-4)] | (3.5,-7) - [(-1000000,200),(300000,-40)] | (-350000,80) - [(11,22),(33,44)] | (22,33) - [(-10,2),(-10,3)] | (-10,2.5) - [(0,-20),(30,-20)] | (15,-20) - [(NaN,1),(NaN,90)] | (NaN,45.5) -(8 rows) - --- Has points less than line segment -SELECT l1.s, l2.s FROM LSEG_TBL l1, LSEG_TBL l2 WHERE l1.s < l2.s; - s | s ---------------------+------------------------------- - [(1,2),(3,4)] | [(0,0),(6,6)] - [(1,2),(3,4)] | [(10,-10),(-3,-4)] - [(1,2),(3,4)] | [(-1000000,200),(300000,-40)] - [(1,2),(3,4)] | [(11,22),(33,44)] - [(1,2),(3,4)] | [(0,-20),(30,-20)] - [(0,0),(6,6)] | [(10,-10),(-3,-4)] - [(0,0),(6,6)] | [(-1000000,200),(300000,-40)] - [(0,0),(6,6)] | [(11,22),(33,44)] - [(0,0),(6,6)] | [(0,-20),(30,-20)] - [(10,-10),(-3,-4)] | [(-1000000,200),(300000,-40)] - [(10,-10),(-3,-4)] | [(11,22),(33,44)] - [(10,-10),(-3,-4)] | [(0,-20),(30,-20)] - [(11,22),(33,44)] | [(-1000000,200),(300000,-40)] - [(-10,2),(-10,3)] | [(1,2),(3,4)] - [(-10,2),(-10,3)] | [(0,0),(6,6)] - [(-10,2),(-10,3)] | [(10,-10),(-3,-4)] - [(-10,2),(-10,3)] | [(-1000000,200),(300000,-40)] - [(-10,2),(-10,3)] | [(11,22),(33,44)] - [(-10,2),(-10,3)] | [(0,-20),(30,-20)] - [(0,-20),(30,-20)] | [(-1000000,200),(300000,-40)] - [(0,-20),(30,-20)] | [(11,22),(33,44)] -(21 rows) - --- Has points less than or equal to line segment -SELECT l1.s, l2.s FROM LSEG_TBL l1, LSEG_TBL l2 WHERE l1.s <= l2.s; - s | s --------------------------------+------------------------------- - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | [(0,0),(6,6)] - [(1,2),(3,4)] | [(10,-10),(-3,-4)] - [(1,2),(3,4)] | [(-1000000,200),(300000,-40)] - [(1,2),(3,4)] | [(11,22),(33,44)] - [(1,2),(3,4)] | [(0,-20),(30,-20)] - [(0,0),(6,6)] | [(0,0),(6,6)] - [(0,0),(6,6)] | [(10,-10),(-3,-4)] - [(0,0),(6,6)] | [(-1000000,200),(300000,-40)] - [(0,0),(6,6)] | [(11,22),(33,44)] - [(0,0),(6,6)] | [(0,-20),(30,-20)] - [(10,-10),(-3,-4)] | [(10,-10),(-3,-4)] - [(10,-10),(-3,-4)] | [(-1000000,200),(300000,-40)] - [(10,-10),(-3,-4)] | [(11,22),(33,44)] - [(10,-10),(-3,-4)] | [(0,-20),(30,-20)] - [(-1000000,200),(300000,-40)] | [(-1000000,200),(300000,-40)] - [(11,22),(33,44)] | [(-1000000,200),(300000,-40)] - [(11,22),(33,44)] | [(11,22),(33,44)] - [(-10,2),(-10,3)] | [(1,2),(3,4)] - [(-10,2),(-10,3)] | [(0,0),(6,6)] - [(-10,2),(-10,3)] | [(10,-10),(-3,-4)] - [(-10,2),(-10,3)] | [(-1000000,200),(300000,-40)] - [(-10,2),(-10,3)] | [(11,22),(33,44)] - [(-10,2),(-10,3)] | [(-10,2),(-10,3)] - [(-10,2),(-10,3)] | [(0,-20),(30,-20)] - [(0,-20),(30,-20)] | [(-1000000,200),(300000,-40)] - [(0,-20),(30,-20)] | [(11,22),(33,44)] - [(0,-20),(30,-20)] | [(0,-20),(30,-20)] -(28 rows) - --- Has points equal to line segment -SELECT l1.s, l2.s FROM LSEG_TBL l1, LSEG_TBL l2 WHERE l1.s = l2.s; - s | s --------------------------------+------------------------------- - [(1,2),(3,4)] | [(1,2),(3,4)] - [(0,0),(6,6)] | [(0,0),(6,6)] - [(10,-10),(-3,-4)] | [(10,-10),(-3,-4)] - [(-1000000,200),(300000,-40)] | [(-1000000,200),(300000,-40)] - [(11,22),(33,44)] | [(11,22),(33,44)] - [(-10,2),(-10,3)] | [(-10,2),(-10,3)] - [(0,-20),(30,-20)] | [(0,-20),(30,-20)] - [(NaN,1),(NaN,90)] | [(NaN,1),(NaN,90)] -(8 rows) - --- Has points greater than or equal to line segment -SELECT l1.s, l2.s FROM LSEG_TBL l1, LSEG_TBL l2 WHERE l1.s >= l2.s; - s | s --------------------------------+------------------------------- - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | [(-10,2),(-10,3)] - [(0,0),(6,6)] | [(1,2),(3,4)] - [(0,0),(6,6)] | [(0,0),(6,6)] - [(0,0),(6,6)] | [(-10,2),(-10,3)] - [(10,-10),(-3,-4)] | [(1,2),(3,4)] - [(10,-10),(-3,-4)] | [(0,0),(6,6)] - [(10,-10),(-3,-4)] | [(10,-10),(-3,-4)] - [(10,-10),(-3,-4)] | [(-10,2),(-10,3)] - [(-1000000,200),(300000,-40)] | [(1,2),(3,4)] - [(-1000000,200),(300000,-40)] | [(0,0),(6,6)] - [(-1000000,200),(300000,-40)] | [(10,-10),(-3,-4)] - [(-1000000,200),(300000,-40)] | [(-1000000,200),(300000,-40)] - [(-1000000,200),(300000,-40)] | [(11,22),(33,44)] - [(-1000000,200),(300000,-40)] | [(-10,2),(-10,3)] - [(-1000000,200),(300000,-40)] | [(0,-20),(30,-20)] - [(11,22),(33,44)] | [(1,2),(3,4)] - [(11,22),(33,44)] | [(0,0),(6,6)] - [(11,22),(33,44)] | [(10,-10),(-3,-4)] - [(11,22),(33,44)] | [(11,22),(33,44)] - [(11,22),(33,44)] | [(-10,2),(-10,3)] - [(11,22),(33,44)] | [(0,-20),(30,-20)] - [(-10,2),(-10,3)] | [(-10,2),(-10,3)] - [(0,-20),(30,-20)] | [(1,2),(3,4)] - [(0,-20),(30,-20)] | [(0,0),(6,6)] - [(0,-20),(30,-20)] | [(10,-10),(-3,-4)] - [(0,-20),(30,-20)] | [(-10,2),(-10,3)] - [(0,-20),(30,-20)] | [(0,-20),(30,-20)] -(28 rows) - --- Has points greater than line segment -SELECT l1.s, l2.s FROM LSEG_TBL l1, LSEG_TBL l2 WHERE l1.s > l2.s; - s | s --------------------------------+-------------------- - [(1,2),(3,4)] | [(-10,2),(-10,3)] - [(0,0),(6,6)] | [(1,2),(3,4)] - [(0,0),(6,6)] | [(-10,2),(-10,3)] - [(10,-10),(-3,-4)] | [(1,2),(3,4)] - [(10,-10),(-3,-4)] | [(0,0),(6,6)] - [(10,-10),(-3,-4)] | [(-10,2),(-10,3)] - [(-1000000,200),(300000,-40)] | [(1,2),(3,4)] - [(-1000000,200),(300000,-40)] | [(0,0),(6,6)] - [(-1000000,200),(300000,-40)] | [(10,-10),(-3,-4)] - [(-1000000,200),(300000,-40)] | [(11,22),(33,44)] - [(-1000000,200),(300000,-40)] | [(-10,2),(-10,3)] - [(-1000000,200),(300000,-40)] | [(0,-20),(30,-20)] - [(11,22),(33,44)] | [(1,2),(3,4)] - [(11,22),(33,44)] | [(0,0),(6,6)] - [(11,22),(33,44)] | [(10,-10),(-3,-4)] - [(11,22),(33,44)] | [(-10,2),(-10,3)] - [(11,22),(33,44)] | [(0,-20),(30,-20)] - [(0,-20),(30,-20)] | [(1,2),(3,4)] - [(0,-20),(30,-20)] | [(0,0),(6,6)] - [(0,-20),(30,-20)] | [(10,-10),(-3,-4)] - [(0,-20),(30,-20)] | [(-10,2),(-10,3)] -(21 rows) - --- Has points not equal to line segment -SELECT l1.s, l2.s FROM LSEG_TBL l1, LSEG_TBL l2 WHERE l1.s != l2.s; - s | s --------------------------------+------------------------------- - [(1,2),(3,4)] | [(0,0),(6,6)] - [(1,2),(3,4)] | [(10,-10),(-3,-4)] - [(1,2),(3,4)] | [(-1000000,200),(300000,-40)] - [(1,2),(3,4)] | [(11,22),(33,44)] - [(1,2),(3,4)] | [(-10,2),(-10,3)] - [(1,2),(3,4)] | [(0,-20),(30,-20)] - [(1,2),(3,4)] | [(NaN,1),(NaN,90)] - [(0,0),(6,6)] | [(1,2),(3,4)] - [(0,0),(6,6)] | [(10,-10),(-3,-4)] - [(0,0),(6,6)] | [(-1000000,200),(300000,-40)] - [(0,0),(6,6)] | [(11,22),(33,44)] - [(0,0),(6,6)] | [(-10,2),(-10,3)] - [(0,0),(6,6)] | [(0,-20),(30,-20)] - [(0,0),(6,6)] | [(NaN,1),(NaN,90)] - [(10,-10),(-3,-4)] | [(1,2),(3,4)] - [(10,-10),(-3,-4)] | [(0,0),(6,6)] - [(10,-10),(-3,-4)] | [(-1000000,200),(300000,-40)] - [(10,-10),(-3,-4)] | [(11,22),(33,44)] - [(10,-10),(-3,-4)] | [(-10,2),(-10,3)] - [(10,-10),(-3,-4)] | [(0,-20),(30,-20)] - [(10,-10),(-3,-4)] | [(NaN,1),(NaN,90)] - [(-1000000,200),(300000,-40)] | [(1,2),(3,4)] - [(-1000000,200),(300000,-40)] | [(0,0),(6,6)] - [(-1000000,200),(300000,-40)] | [(10,-10),(-3,-4)] - [(-1000000,200),(300000,-40)] | [(11,22),(33,44)] - [(-1000000,200),(300000,-40)] | [(-10,2),(-10,3)] - [(-1000000,200),(300000,-40)] | [(0,-20),(30,-20)] - [(-1000000,200),(300000,-40)] | [(NaN,1),(NaN,90)] - [(11,22),(33,44)] | [(1,2),(3,4)] - [(11,22),(33,44)] | [(0,0),(6,6)] - [(11,22),(33,44)] | [(10,-10),(-3,-4)] - [(11,22),(33,44)] | [(-1000000,200),(300000,-40)] - [(11,22),(33,44)] | [(-10,2),(-10,3)] - [(11,22),(33,44)] | [(0,-20),(30,-20)] - [(11,22),(33,44)] | [(NaN,1),(NaN,90)] - [(-10,2),(-10,3)] | [(1,2),(3,4)] - [(-10,2),(-10,3)] | [(0,0),(6,6)] - [(-10,2),(-10,3)] | [(10,-10),(-3,-4)] - [(-10,2),(-10,3)] | [(-1000000,200),(300000,-40)] - [(-10,2),(-10,3)] | [(11,22),(33,44)] - [(-10,2),(-10,3)] | [(0,-20),(30,-20)] - [(-10,2),(-10,3)] | [(NaN,1),(NaN,90)] - [(0,-20),(30,-20)] | [(1,2),(3,4)] - [(0,-20),(30,-20)] | [(0,0),(6,6)] - [(0,-20),(30,-20)] | [(10,-10),(-3,-4)] - [(0,-20),(30,-20)] | [(-1000000,200),(300000,-40)] - [(0,-20),(30,-20)] | [(11,22),(33,44)] - [(0,-20),(30,-20)] | [(-10,2),(-10,3)] - [(0,-20),(30,-20)] | [(NaN,1),(NaN,90)] - [(NaN,1),(NaN,90)] | [(1,2),(3,4)] - [(NaN,1),(NaN,90)] | [(0,0),(6,6)] - [(NaN,1),(NaN,90)] | [(10,-10),(-3,-4)] - [(NaN,1),(NaN,90)] | [(-1000000,200),(300000,-40)] - [(NaN,1),(NaN,90)] | [(11,22),(33,44)] - [(NaN,1),(NaN,90)] | [(-10,2),(-10,3)] - [(NaN,1),(NaN,90)] | [(0,-20),(30,-20)] -(56 rows) - --- Parallel with line segment -SELECT l1.s, l2.s FROM LSEG_TBL l1, LSEG_TBL l2 WHERE l1.s ?|| l2.s; - s | s --------------------------------+------------------------------- - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | [(0,0),(6,6)] - [(1,2),(3,4)] | [(11,22),(33,44)] - [(0,0),(6,6)] | [(1,2),(3,4)] - [(0,0),(6,6)] | [(0,0),(6,6)] - [(0,0),(6,6)] | [(11,22),(33,44)] - [(10,-10),(-3,-4)] | [(10,-10),(-3,-4)] - [(-1000000,200),(300000,-40)] | [(-1000000,200),(300000,-40)] - [(11,22),(33,44)] | [(1,2),(3,4)] - [(11,22),(33,44)] | [(0,0),(6,6)] - [(11,22),(33,44)] | [(11,22),(33,44)] - [(-10,2),(-10,3)] | [(-10,2),(-10,3)] - [(0,-20),(30,-20)] | [(0,-20),(30,-20)] -(13 rows) - --- Perpendicular with line segment -SELECT l1.s, l2.s FROM LSEG_TBL l1, LSEG_TBL l2 WHERE l1.s ?-| l2.s; - s | s ---------------------+-------------------- - [(-10,2),(-10,3)] | [(0,-20),(30,-20)] - [(0,-20),(30,-20)] | [(-10,2),(-10,3)] -(2 rows) - --- Distance to line -SELECT l.s, l1.s, l.s <-> l1.s FROM LSEG_TBL l, LINE_TBL l1; - s | s | ?column? --------------------------------+---------------------------------------+---------------- - [(1,2),(3,4)] | {0,-1,5} | 1 - [(0,0),(6,6)] | {0,-1,5} | 0 - [(10,-10),(-3,-4)] | {0,-1,5} | 9 - [(-1000000,200),(300000,-40)] | {0,-1,5} | 0 - [(11,22),(33,44)] | {0,-1,5} | 17 - [(-10,2),(-10,3)] | {0,-1,5} | 2 - [(0,-20),(30,-20)] | {0,-1,5} | 25 - [(NaN,1),(NaN,90)] | {0,-1,5} | NaN - [(1,2),(3,4)] | {1,0,5} | 6 - [(0,0),(6,6)] | {1,0,5} | 5 - [(10,-10),(-3,-4)] | {1,0,5} | 2 - [(-1000000,200),(300000,-40)] | {1,0,5} | 0 - [(11,22),(33,44)] | {1,0,5} | 16 - [(-10,2),(-10,3)] | {1,0,5} | 5 - [(0,-20),(30,-20)] | {1,0,5} | 5 - [(NaN,1),(NaN,90)] | {1,0,5} | NaN - [(1,2),(3,4)] | {0,3,0} | 2 - [(0,0),(6,6)] | {0,3,0} | 0 - [(10,-10),(-3,-4)] | {0,3,0} | 4 - [(-1000000,200),(300000,-40)] | {0,3,0} | 0 - [(11,22),(33,44)] | {0,3,0} | 22 - [(-10,2),(-10,3)] | {0,3,0} | 2 - [(0,-20),(30,-20)] | {0,3,0} | 20 - [(NaN,1),(NaN,90)] | {0,3,0} | NaN - [(1,2),(3,4)] | {1,-1,0} | 0.707106781187 - [(0,0),(6,6)] | {1,-1,0} | 0 - [(10,-10),(-3,-4)] | {1,-1,0} | 0.707106781187 - [(-1000000,200),(300000,-40)] | {1,-1,0} | 0 - [(11,22),(33,44)] | {1,-1,0} | 7.77817459305 - [(-10,2),(-10,3)] | {1,-1,0} | 8.48528137424 - [(0,-20),(30,-20)] | {1,-1,0} | 14.1421356237 - [(NaN,1),(NaN,90)] | {1,-1,0} | NaN - [(1,2),(3,4)] | {-0.4,-1,-6} | 7.79920420344 - [(0,0),(6,6)] | {-0.4,-1,-6} | 5.57086014531 - [(10,-10),(-3,-4)] | {-0.4,-1,-6} | 0 - [(-1000000,200),(300000,-40)] | {-0.4,-1,-6} | 0 - [(11,22),(33,44)] | {-0.4,-1,-6} | 30.0826447847 - [(-10,2),(-10,3)] | {-0.4,-1,-6} | 3.71390676354 - [(0,-20),(30,-20)] | {-0.4,-1,-6} | 1.85695338177 - [(NaN,1),(NaN,90)] | {-0.4,-1,-6} | NaN - [(1,2),(3,4)] | {-0.000184615384615,-1,15.3846153846} | 11.3840613445 - [(0,0),(6,6)] | {-0.000184615384615,-1,15.3846153846} | 9.3835075324 - [(10,-10),(-3,-4)] | {-0.000184615384615,-1,15.3846153846} | 19.3851689004 - [(-1000000,200),(300000,-40)] | {-0.000184615384615,-1,15.3846153846} | 0 - [(11,22),(33,44)] | {-0.000184615384615,-1,15.3846153846} | 6.61741527185 - [(-10,2),(-10,3)] | {-0.000184615384615,-1,15.3846153846} | 12.3864613274 - [(0,-20),(30,-20)] | {-0.000184615384615,-1,15.3846153846} | 35.3790763202 - [(NaN,1),(NaN,90)] | {-0.000184615384615,-1,15.3846153846} | NaN - [(1,2),(3,4)] | {3,NaN,5} | NaN - [(0,0),(6,6)] | {3,NaN,5} | NaN - [(10,-10),(-3,-4)] | {3,NaN,5} | NaN - [(-1000000,200),(300000,-40)] | {3,NaN,5} | NaN - [(11,22),(33,44)] | {3,NaN,5} | NaN - [(-10,2),(-10,3)] | {3,NaN,5} | NaN - [(0,-20),(30,-20)] | {3,NaN,5} | NaN - [(NaN,1),(NaN,90)] | {3,NaN,5} | NaN - [(1,2),(3,4)] | {NaN,NaN,NaN} | NaN - [(0,0),(6,6)] | {NaN,NaN,NaN} | NaN - [(10,-10),(-3,-4)] | {NaN,NaN,NaN} | NaN - [(-1000000,200),(300000,-40)] | {NaN,NaN,NaN} | NaN - [(11,22),(33,44)] | {NaN,NaN,NaN} | NaN - [(-10,2),(-10,3)] | {NaN,NaN,NaN} | NaN - [(0,-20),(30,-20)] | {NaN,NaN,NaN} | NaN - [(NaN,1),(NaN,90)] | {NaN,NaN,NaN} | NaN - [(1,2),(3,4)] | {0,-1,3} | 0 - [(0,0),(6,6)] | {0,-1,3} | 0 - [(10,-10),(-3,-4)] | {0,-1,3} | 7 - [(-1000000,200),(300000,-40)] | {0,-1,3} | 0 - [(11,22),(33,44)] | {0,-1,3} | 19 - [(-10,2),(-10,3)] | {0,-1,3} | 0 - [(0,-20),(30,-20)] | {0,-1,3} | 23 - [(NaN,1),(NaN,90)] | {0,-1,3} | NaN - [(1,2),(3,4)] | {-1,0,3} | 0 - [(0,0),(6,6)] | {-1,0,3} | 0 - [(10,-10),(-3,-4)] | {-1,0,3} | 0 - [(-1000000,200),(300000,-40)] | {-1,0,3} | 0 - [(11,22),(33,44)] | {-1,0,3} | 8 - [(-10,2),(-10,3)] | {-1,0,3} | 13 - [(0,-20),(30,-20)] | {-1,0,3} | 0 - [(NaN,1),(NaN,90)] | {-1,0,3} | NaN -(80 rows) - --- Distance to line segment -SELECT l1.s, l2.s, l1.s <-> l2.s FROM LSEG_TBL l1, LSEG_TBL l2; - s | s | ?column? --------------------------------+-------------------------------+---------------- - [(1,2),(3,4)] | [(1,2),(3,4)] | 0 - [(1,2),(3,4)] | [(0,0),(6,6)] | 0.707106781187 - [(1,2),(3,4)] | [(10,-10),(-3,-4)] | 7.12398901685 - [(1,2),(3,4)] | [(-1000000,200),(300000,-40)] | 11.3840613445 - [(1,2),(3,4)] | [(11,22),(33,44)] | 19.6977156036 - [(1,2),(3,4)] | [(-10,2),(-10,3)] | 11 - [(1,2),(3,4)] | [(0,-20),(30,-20)] | 22 - [(1,2),(3,4)] | [(NaN,1),(NaN,90)] | NaN - [(0,0),(6,6)] | [(1,2),(3,4)] | 0.707106781187 - [(0,0),(6,6)] | [(0,0),(6,6)] | 0 - [(0,0),(6,6)] | [(10,-10),(-3,-4)] | 4.88901207039 - [(0,0),(6,6)] | [(-1000000,200),(300000,-40)] | 9.3835075324 - [(0,0),(6,6)] | [(11,22),(33,44)] | 16.7630546142 - [(0,0),(6,6)] | [(-10,2),(-10,3)] | 10.1980390272 - [(0,0),(6,6)] | [(0,-20),(30,-20)] | 20 - [(0,0),(6,6)] | [(NaN,1),(NaN,90)] | NaN - [(10,-10),(-3,-4)] | [(1,2),(3,4)] | 7.12398901685 - [(10,-10),(-3,-4)] | [(0,0),(6,6)] | 4.88901207039 - [(10,-10),(-3,-4)] | [(10,-10),(-3,-4)] | 0 - [(10,-10),(-3,-4)] | [(-1000000,200),(300000,-40)] | 19.3851689004 - [(10,-10),(-3,-4)] | [(11,22),(33,44)] | 29.4737584815 - [(10,-10),(-3,-4)] | [(-10,2),(-10,3)] | 9.21954445729 - [(10,-10),(-3,-4)] | [(0,-20),(30,-20)] | 10 - [(10,-10),(-3,-4)] | [(NaN,1),(NaN,90)] | NaN - [(-1000000,200),(300000,-40)] | [(1,2),(3,4)] | 11.3840613445 - [(-1000000,200),(300000,-40)] | [(0,0),(6,6)] | 9.3835075324 - [(-1000000,200),(300000,-40)] | [(10,-10),(-3,-4)] | 19.3851689004 - [(-1000000,200),(300000,-40)] | [(-1000000,200),(300000,-40)] | 0 - [(-1000000,200),(300000,-40)] | [(11,22),(33,44)] | 6.61741527185 - [(-1000000,200),(300000,-40)] | [(-10,2),(-10,3)] | 12.3864613274 - [(-1000000,200),(300000,-40)] | [(0,-20),(30,-20)] | 35.3790763202 - [(-1000000,200),(300000,-40)] | [(NaN,1),(NaN,90)] | NaN - [(11,22),(33,44)] | [(1,2),(3,4)] | 19.6977156036 - [(11,22),(33,44)] | [(0,0),(6,6)] | 16.7630546142 - [(11,22),(33,44)] | [(10,-10),(-3,-4)] | 29.4737584815 - [(11,22),(33,44)] | [(-1000000,200),(300000,-40)] | 6.61741527185 - [(11,22),(33,44)] | [(11,22),(33,44)] | 0 - [(11,22),(33,44)] | [(-10,2),(-10,3)] | 28.319604517 - [(11,22),(33,44)] | [(0,-20),(30,-20)] | 42 - [(11,22),(33,44)] | [(NaN,1),(NaN,90)] | NaN - [(-10,2),(-10,3)] | [(1,2),(3,4)] | 11 - [(-10,2),(-10,3)] | [(0,0),(6,6)] | 10.1980390272 - [(-10,2),(-10,3)] | [(10,-10),(-3,-4)] | 9.21954445729 - [(-10,2),(-10,3)] | [(-1000000,200),(300000,-40)] | 12.3864613274 - [(-10,2),(-10,3)] | [(11,22),(33,44)] | 28.319604517 - [(-10,2),(-10,3)] | [(-10,2),(-10,3)] | 0 - [(-10,2),(-10,3)] | [(0,-20),(30,-20)] | 24.1660919472 - [(-10,2),(-10,3)] | [(NaN,1),(NaN,90)] | NaN - [(0,-20),(30,-20)] | [(1,2),(3,4)] | 22 - [(0,-20),(30,-20)] | [(0,0),(6,6)] | 20 - [(0,-20),(30,-20)] | [(10,-10),(-3,-4)] | 10 - [(0,-20),(30,-20)] | [(-1000000,200),(300000,-40)] | 35.3790763202 - [(0,-20),(30,-20)] | [(11,22),(33,44)] | 42 - [(0,-20),(30,-20)] | [(-10,2),(-10,3)] | 24.1660919472 - [(0,-20),(30,-20)] | [(0,-20),(30,-20)] | 0 - [(0,-20),(30,-20)] | [(NaN,1),(NaN,90)] | NaN - [(NaN,1),(NaN,90)] | [(1,2),(3,4)] | NaN - [(NaN,1),(NaN,90)] | [(0,0),(6,6)] | NaN - [(NaN,1),(NaN,90)] | [(10,-10),(-3,-4)] | NaN - [(NaN,1),(NaN,90)] | [(-1000000,200),(300000,-40)] | NaN - [(NaN,1),(NaN,90)] | [(11,22),(33,44)] | NaN - [(NaN,1),(NaN,90)] | [(-10,2),(-10,3)] | NaN - [(NaN,1),(NaN,90)] | [(0,-20),(30,-20)] | NaN - [(NaN,1),(NaN,90)] | [(NaN,1),(NaN,90)] | NaN -(64 rows) - --- Distance to box -SELECT l.s, b.f1, l.s <-> b.f1 FROM LSEG_TBL l, BOX_TBL b; - s | f1 | ?column? --------------------------------+---------------------+---------------- - [(1,2),(3,4)] | (2,2),(0,0) | 0 - [(1,2),(3,4)] | (3,3),(1,1) | 0 - [(1,2),(3,4)] | (-2,2),(-8,-10) | 3 - [(1,2),(3,4)] | (2.5,3.5),(2.5,2.5) | 0 - [(1,2),(3,4)] | (3,3),(3,3) | 0.707106781187 - [(0,0),(6,6)] | (2,2),(0,0) | 0 - [(0,0),(6,6)] | (3,3),(1,1) | 0 - [(0,0),(6,6)] | (-2,2),(-8,-10) | 2 - [(0,0),(6,6)] | (2.5,3.5),(2.5,2.5) | 0 - [(0,0),(6,6)] | (3,3),(3,3) | 0 - [(10,-10),(-3,-4)] | (2,2),(0,0) | 4.88901207039 - [(10,-10),(-3,-4)] | (3,3),(1,1) | 6.21602963235 - [(10,-10),(-3,-4)] | (-2,2),(-8,-10) | 0 - [(10,-10),(-3,-4)] | (2.5,3.5),(2.5,2.5) | 8.20655597529 - [(10,-10),(-3,-4)] | (3,3),(3,3) | 8.87006475627 - [(-1000000,200),(300000,-40)] | (2,2),(0,0) | 13.3842459258 - [(-1000000,200),(300000,-40)] | (3,3),(1,1) | 12.3840613274 - [(-1000000,200),(300000,-40)] | (-2,2),(-8,-10) | 13.3849843873 - [(-1000000,200),(300000,-40)] | (2.5,3.5),(2.5,2.5) | 11.8841536436 - [(-1000000,200),(300000,-40)] | (3,3),(3,3) | 12.3840613274 - [(11,22),(33,44)] | (2,2),(0,0) | 21.9317121995 - [(11,22),(33,44)] | (3,3),(1,1) | 20.6155281281 - [(11,22),(33,44)] | (-2,2),(-8,-10) | 23.8537208838 - [(11,22),(33,44)] | (2.5,3.5),(2.5,2.5) | 20.3592730715 - [(11,22),(33,44)] | (3,3),(3,3) | 20.6155281281 - [(-10,2),(-10,3)] | (2,2),(0,0) | 10 - [(-10,2),(-10,3)] | (3,3),(1,1) | 11 - [(-10,2),(-10,3)] | (-2,2),(-8,-10) | 2 - [(-10,2),(-10,3)] | (2.5,3.5),(2.5,2.5) | 12.5 - [(-10,2),(-10,3)] | (3,3),(3,3) | 13 - [(0,-20),(30,-20)] | (2,2),(0,0) | 20 - [(0,-20),(30,-20)] | (3,3),(1,1) | 21 - [(0,-20),(30,-20)] | (-2,2),(-8,-10) | 10.1980390272 - [(0,-20),(30,-20)] | (2.5,3.5),(2.5,2.5) | 22.5 - [(0,-20),(30,-20)] | (3,3),(3,3) | 23 - [(NaN,1),(NaN,90)] | (2,2),(0,0) | NaN - [(NaN,1),(NaN,90)] | (3,3),(1,1) | NaN - [(NaN,1),(NaN,90)] | (-2,2),(-8,-10) | NaN - [(NaN,1),(NaN,90)] | (2.5,3.5),(2.5,2.5) | NaN - [(NaN,1),(NaN,90)] | (3,3),(3,3) | NaN -(40 rows) - --- Intersect with line segment -SELECT l.s, l1.s FROM LSEG_TBL l, LINE_TBL l1 WHERE l.s ?# l1.s; - s | s --------------------------------+-------------- - [(0,0),(6,6)] | {0,-1,5} - [(-1000000,200),(300000,-40)] | {0,-1,5} - [(-1000000,200),(300000,-40)] | {1,0,5} - [(0,0),(6,6)] | {0,3,0} - [(-1000000,200),(300000,-40)] | {0,3,0} - [(-1000000,200),(300000,-40)] | {1,-1,0} - [(10,-10),(-3,-4)] | {-0.4,-1,-6} - [(-1000000,200),(300000,-40)] | {-0.4,-1,-6} - [(1,2),(3,4)] | {0,-1,3} - [(0,0),(6,6)] | {0,-1,3} - [(-1000000,200),(300000,-40)] | {0,-1,3} - [(-10,2),(-10,3)] | {0,-1,3} - [(1,2),(3,4)] | {-1,0,3} - [(0,0),(6,6)] | {-1,0,3} - [(10,-10),(-3,-4)] | {-1,0,3} - [(-1000000,200),(300000,-40)] | {-1,0,3} - [(0,-20),(30,-20)] | {-1,0,3} -(17 rows) - --- Intersect with box -SELECT l.s, b.f1 FROM LSEG_TBL l, BOX_TBL b WHERE l.s ?# b.f1; - s | f1 ---------------------+--------------------- - [(1,2),(3,4)] | (2,2),(0,0) - [(1,2),(3,4)] | (3,3),(1,1) - [(1,2),(3,4)] | (2.5,3.5),(2.5,2.5) - [(0,0),(6,6)] | (2,2),(0,0) - [(0,0),(6,6)] | (3,3),(1,1) - [(0,0),(6,6)] | (2.5,3.5),(2.5,2.5) - [(0,0),(6,6)] | (3,3),(3,3) - [(10,-10),(-3,-4)] | (-2,2),(-8,-10) -(8 rows) - --- Intersection point with line segment -SELECT l1.s, l2.s, l1.s # l2.s FROM LSEG_TBL l1, LSEG_TBL l2; - s | s | ?column? --------------------------------+-------------------------------+---------- - [(1,2),(3,4)] | [(1,2),(3,4)] | - [(1,2),(3,4)] | [(0,0),(6,6)] | - [(1,2),(3,4)] | [(10,-10),(-3,-4)] | - [(1,2),(3,4)] | [(-1000000,200),(300000,-40)] | - [(1,2),(3,4)] | [(11,22),(33,44)] | - [(1,2),(3,4)] | [(-10,2),(-10,3)] | - [(1,2),(3,4)] | [(0,-20),(30,-20)] | - [(1,2),(3,4)] | [(NaN,1),(NaN,90)] | - [(0,0),(6,6)] | [(1,2),(3,4)] | - [(0,0),(6,6)] | [(0,0),(6,6)] | - [(0,0),(6,6)] | [(10,-10),(-3,-4)] | - [(0,0),(6,6)] | [(-1000000,200),(300000,-40)] | - [(0,0),(6,6)] | [(11,22),(33,44)] | - [(0,0),(6,6)] | [(-10,2),(-10,3)] | - [(0,0),(6,6)] | [(0,-20),(30,-20)] | - [(0,0),(6,6)] | [(NaN,1),(NaN,90)] | - [(10,-10),(-3,-4)] | [(1,2),(3,4)] | - [(10,-10),(-3,-4)] | [(0,0),(6,6)] | - [(10,-10),(-3,-4)] | [(10,-10),(-3,-4)] | - [(10,-10),(-3,-4)] | [(-1000000,200),(300000,-40)] | - [(10,-10),(-3,-4)] | [(11,22),(33,44)] | - [(10,-10),(-3,-4)] | [(-10,2),(-10,3)] | - [(10,-10),(-3,-4)] | [(0,-20),(30,-20)] | - [(10,-10),(-3,-4)] | [(NaN,1),(NaN,90)] | - [(-1000000,200),(300000,-40)] | [(1,2),(3,4)] | - [(-1000000,200),(300000,-40)] | [(0,0),(6,6)] | - [(-1000000,200),(300000,-40)] | [(10,-10),(-3,-4)] | - [(-1000000,200),(300000,-40)] | [(-1000000,200),(300000,-40)] | - [(-1000000,200),(300000,-40)] | [(11,22),(33,44)] | - [(-1000000,200),(300000,-40)] | [(-10,2),(-10,3)] | - [(-1000000,200),(300000,-40)] | [(0,-20),(30,-20)] | - [(-1000000,200),(300000,-40)] | [(NaN,1),(NaN,90)] | - [(11,22),(33,44)] | [(1,2),(3,4)] | - [(11,22),(33,44)] | [(0,0),(6,6)] | - [(11,22),(33,44)] | [(10,-10),(-3,-4)] | - [(11,22),(33,44)] | [(-1000000,200),(300000,-40)] | - [(11,22),(33,44)] | [(11,22),(33,44)] | - [(11,22),(33,44)] | [(-10,2),(-10,3)] | - [(11,22),(33,44)] | [(0,-20),(30,-20)] | - [(11,22),(33,44)] | [(NaN,1),(NaN,90)] | - [(-10,2),(-10,3)] | [(1,2),(3,4)] | - [(-10,2),(-10,3)] | [(0,0),(6,6)] | - [(-10,2),(-10,3)] | [(10,-10),(-3,-4)] | - [(-10,2),(-10,3)] | [(-1000000,200),(300000,-40)] | - [(-10,2),(-10,3)] | [(11,22),(33,44)] | - [(-10,2),(-10,3)] | [(-10,2),(-10,3)] | - [(-10,2),(-10,3)] | [(0,-20),(30,-20)] | - [(-10,2),(-10,3)] | [(NaN,1),(NaN,90)] | - [(0,-20),(30,-20)] | [(1,2),(3,4)] | - [(0,-20),(30,-20)] | [(0,0),(6,6)] | - [(0,-20),(30,-20)] | [(10,-10),(-3,-4)] | - [(0,-20),(30,-20)] | [(-1000000,200),(300000,-40)] | - [(0,-20),(30,-20)] | [(11,22),(33,44)] | - [(0,-20),(30,-20)] | [(-10,2),(-10,3)] | - [(0,-20),(30,-20)] | [(0,-20),(30,-20)] | - [(0,-20),(30,-20)] | [(NaN,1),(NaN,90)] | - [(NaN,1),(NaN,90)] | [(1,2),(3,4)] | - [(NaN,1),(NaN,90)] | [(0,0),(6,6)] | - [(NaN,1),(NaN,90)] | [(10,-10),(-3,-4)] | - [(NaN,1),(NaN,90)] | [(-1000000,200),(300000,-40)] | - [(NaN,1),(NaN,90)] | [(11,22),(33,44)] | - [(NaN,1),(NaN,90)] | [(-10,2),(-10,3)] | - [(NaN,1),(NaN,90)] | [(0,-20),(30,-20)] | - [(NaN,1),(NaN,90)] | [(NaN,1),(NaN,90)] | -(64 rows) - --- Closest point to line -SELECT l.s, l1.s, l.s ## l1.s FROM LSEG_TBL l, LINE_TBL l1; -ERROR: function "close_sl" not implemented --- Closest point to line segment -SELECT l1.s, l2.s, l1.s ## l2.s FROM LSEG_TBL l1, LSEG_TBL l2; - s | s | ?column? --------------------------------+-------------------------------+--------------------------------- - [(1,2),(3,4)] | [(1,2),(3,4)] | - [(1,2),(3,4)] | [(0,0),(6,6)] | - [(1,2),(3,4)] | [(10,-10),(-3,-4)] | (-1.98536585366,-4.46829268293) - [(1,2),(3,4)] | [(-1000000,200),(300000,-40)] | (3.00210167283,15.3840611505) - [(1,2),(3,4)] | [(11,22),(33,44)] | - [(1,2),(3,4)] | [(-10,2),(-10,3)] | (-10,2) - [(1,2),(3,4)] | [(0,-20),(30,-20)] | (1,-20) - [(1,2),(3,4)] | [(NaN,1),(NaN,90)] | - [(0,0),(6,6)] | [(1,2),(3,4)] | - [(0,0),(6,6)] | [(0,0),(6,6)] | - [(0,0),(6,6)] | [(10,-10),(-3,-4)] | (-2.0487804878,-4.43902439024) - [(0,0),(6,6)] | [(-1000000,200),(300000,-40)] | (6.00173233982,15.3835073725) - [(0,0),(6,6)] | [(11,22),(33,44)] | - [(0,0),(6,6)] | [(-10,2),(-10,3)] | (-10,2) - [(0,0),(6,6)] | [(0,-20),(30,-20)] | (0,-20) - [(0,0),(6,6)] | [(NaN,1),(NaN,90)] | - [(10,-10),(-3,-4)] | [(1,2),(3,4)] | (1,2) - [(10,-10),(-3,-4)] | [(0,0),(6,6)] | (0,0) - [(10,-10),(-3,-4)] | [(10,-10),(-3,-4)] | - [(10,-10),(-3,-4)] | [(-1000000,200),(300000,-40)] | (-2.99642119965,15.3851685701) - [(10,-10),(-3,-4)] | [(11,22),(33,44)] | (11,22) - [(10,-10),(-3,-4)] | [(-10,2),(-10,3)] | (-10,2) - [(10,-10),(-3,-4)] | [(0,-20),(30,-20)] | (10,-20) - [(10,-10),(-3,-4)] | [(NaN,1),(NaN,90)] | - [(-1000000,200),(300000,-40)] | [(1,2),(3,4)] | (3,4) - [(-1000000,200),(300000,-40)] | [(0,0),(6,6)] | (6,6) - [(-1000000,200),(300000,-40)] | [(10,-10),(-3,-4)] | (-3,-4) - [(-1000000,200),(300000,-40)] | [(-1000000,200),(300000,-40)] | - [(-1000000,200),(300000,-40)] | [(11,22),(33,44)] | (11,22) - [(-1000000,200),(300000,-40)] | [(-10,2),(-10,3)] | (-10,3) - [(-1000000,200),(300000,-40)] | [(0,-20),(30,-20)] | (30,-20) - [(-1000000,200),(300000,-40)] | [(NaN,1),(NaN,90)] | - [(11,22),(33,44)] | [(1,2),(3,4)] | - [(11,22),(33,44)] | [(0,0),(6,6)] | - [(11,22),(33,44)] | [(10,-10),(-3,-4)] | (-1.3512195122,-4.76097560976) - [(11,22),(33,44)] | [(-1000000,200),(300000,-40)] | (10.9987783234,15.3825848409) - [(11,22),(33,44)] | [(11,22),(33,44)] | - [(11,22),(33,44)] | [(-10,2),(-10,3)] | (-10,3) - [(11,22),(33,44)] | [(0,-20),(30,-20)] | (11,-20) - [(11,22),(33,44)] | [(NaN,1),(NaN,90)] | - [(-10,2),(-10,3)] | [(1,2),(3,4)] | (1,2) - [(-10,2),(-10,3)] | [(0,0),(6,6)] | (0,0) - [(-10,2),(-10,3)] | [(10,-10),(-3,-4)] | (-3,-4) - [(-10,2),(-10,3)] | [(-1000000,200),(300000,-40)] | (-9.99771326872,15.3864611163) - [(-10,2),(-10,3)] | [(11,22),(33,44)] | (11,22) - [(-10,2),(-10,3)] | [(-10,2),(-10,3)] | - [(-10,2),(-10,3)] | [(0,-20),(30,-20)] | (0,-20) - [(-10,2),(-10,3)] | [(NaN,1),(NaN,90)] | - [(0,-20),(30,-20)] | [(1,2),(3,4)] | (1,2) - [(0,-20),(30,-20)] | [(0,0),(6,6)] | (0,0) - [(0,-20),(30,-20)] | [(10,-10),(-3,-4)] | (10,-10) - [(0,-20),(30,-20)] | [(-1000000,200),(300000,-40)] | (30.0065315217,15.3790757173) - [(0,-20),(30,-20)] | [(11,22),(33,44)] | (11,22) - [(0,-20),(30,-20)] | [(-10,2),(-10,3)] | (-10,2) - [(0,-20),(30,-20)] | [(0,-20),(30,-20)] | - [(0,-20),(30,-20)] | [(NaN,1),(NaN,90)] | - [(NaN,1),(NaN,90)] | [(1,2),(3,4)] | - [(NaN,1),(NaN,90)] | [(0,0),(6,6)] | - [(NaN,1),(NaN,90)] | [(10,-10),(-3,-4)] | - [(NaN,1),(NaN,90)] | [(-1000000,200),(300000,-40)] | - [(NaN,1),(NaN,90)] | [(11,22),(33,44)] | - [(NaN,1),(NaN,90)] | [(-10,2),(-10,3)] | - [(NaN,1),(NaN,90)] | [(0,-20),(30,-20)] | - [(NaN,1),(NaN,90)] | [(NaN,1),(NaN,90)] | -(64 rows) - --- Closest point to box -SELECT l.s, b.f1, l.s ## b.f1 FROM LSEG_TBL l, BOX_TBL b; - s | f1 | ?column? --------------------------------+---------------------+------------- - [(1,2),(3,4)] | (2,2),(0,0) | (1,2) - [(1,2),(3,4)] | (3,3),(1,1) | (1.5,2.5) - [(1,2),(3,4)] | (-2,2),(-8,-10) | (-2,2) - [(1,2),(3,4)] | (2.5,3.5),(2.5,2.5) | (2.25,3.25) - [(1,2),(3,4)] | (3,3),(3,3) | (3,3) - [(0,0),(6,6)] | (2,2),(0,0) | (1,1) - [(0,0),(6,6)] | (3,3),(1,1) | (2,2) - [(0,0),(6,6)] | (-2,2),(-8,-10) | (-2,0) - [(0,0),(6,6)] | (2.5,3.5),(2.5,2.5) | (2.75,2.75) - [(0,0),(6,6)] | (3,3),(3,3) | (3,3) - [(10,-10),(-3,-4)] | (2,2),(0,0) | (0,0) - [(10,-10),(-3,-4)] | (3,3),(1,1) | (1,1) - [(10,-10),(-3,-4)] | (-2,2),(-8,-10) | (-3,-4) - [(10,-10),(-3,-4)] | (2.5,3.5),(2.5,2.5) | (2.5,2.5) - [(10,-10),(-3,-4)] | (3,3),(3,3) | (3,3) - [(-1000000,200),(300000,-40)] | (2,2),(0,0) | (2,2) - [(-1000000,200),(300000,-40)] | (3,3),(1,1) | (3,3) - [(-1000000,200),(300000,-40)] | (-2,2),(-8,-10) | (-2,2) - [(-1000000,200),(300000,-40)] | (2.5,3.5),(2.5,2.5) | (2.5,3.5) - [(-1000000,200),(300000,-40)] | (3,3),(3,3) | (3,3) - [(11,22),(33,44)] | (2,2),(0,0) | (2,2) - [(11,22),(33,44)] | (3,3),(1,1) | (3,3) - [(11,22),(33,44)] | (-2,2),(-8,-10) | (-2,2) - [(11,22),(33,44)] | (2.5,3.5),(2.5,2.5) | (2.5,3.5) - [(11,22),(33,44)] | (3,3),(3,3) | (3,3) - [(-10,2),(-10,3)] | (2,2),(0,0) | (0,2) - [(-10,2),(-10,3)] | (3,3),(1,1) | (1,2) - [(-10,2),(-10,3)] | (-2,2),(-8,-10) | (-8,2) - [(-10,2),(-10,3)] | (2.5,3.5),(2.5,2.5) | (2.5,3) - [(-10,2),(-10,3)] | (3,3),(3,3) | (3,3) - [(0,-20),(30,-20)] | (2,2),(0,0) | (0,0) - [(0,-20),(30,-20)] | (3,3),(1,1) | (1,1) - [(0,-20),(30,-20)] | (-2,2),(-8,-10) | (-2,-10) - [(0,-20),(30,-20)] | (2.5,3.5),(2.5,2.5) | (2.5,2.5) - [(0,-20),(30,-20)] | (3,3),(3,3) | (3,3) - [(NaN,1),(NaN,90)] | (2,2),(0,0) | - [(NaN,1),(NaN,90)] | (3,3),(1,1) | - [(NaN,1),(NaN,90)] | (-2,2),(-8,-10) | - [(NaN,1),(NaN,90)] | (2.5,3.5),(2.5,2.5) | - [(NaN,1),(NaN,90)] | (3,3),(3,3) | -(40 rows) - --- On line -SELECT l.s, l1.s FROM LSEG_TBL l, LINE_TBL l1 WHERE l.s <@ l1.s; - s | s --------------------------------+--------------------------------------- - [(0,0),(6,6)] | {1,-1,0} - [(-1000000,200),(300000,-40)] | {-0.000184615384615,-1,15.3846153846} -(2 rows) - --- On box -SELECT l.s, b.f1 FROM LSEG_TBL l, BOX_TBL b WHERE l.s <@ b.f1; - s | f1 ----+---- -(0 rows) - --- --- Boxes --- -SELECT '' as six, box(f1) AS box FROM CIRCLE_TBL; - six | box ------+---------------------------------------------------------------- - | (7.12132034356,3.12132034356),(2.87867965644,-1.12132034356) - | (71.7106781187,72.7106781187),(-69.7106781187,-68.7106781187) - | (4.53553390593,6.53553390593),(-2.53553390593,-0.535533905933) - | (3.12132034356,4.12132034356),(-1.12132034356,-0.12132034356) - | (107.071067812,207.071067812),(92.9289321881,192.928932188) - | (181.317279836,82.3172798365),(18.6827201635,-80.3172798365) - | (3,5),(3,5) - | (NaN,NaN),(NaN,NaN) -(8 rows) - --- translation -SELECT '' AS twentyfour, b.f1 + p.f1 AS translation - FROM BOX_TBL b, POINT_TBL p; - twentyfour | translation -------------+------------------------------------- - | (2,2),(0,0) - | (3,3),(1,1) - | (-2,2),(-8,-10) - | (2.5,3.5),(2.5,2.5) - | (3,3),(3,3) - | (-8,2),(-10,0) - | (-7,3),(-9,1) - | (-12,2),(-18,-10) - | (-7.5,3.5),(-7.5,2.5) - | (-7,3),(-7,3) - | (-1,6),(-3,4) - | (0,7),(-2,5) - | (-5,6),(-11,-6) - | (-0.5,7.5),(-0.5,6.5) - | (0,7),(0,7) - | (7.1,36.5),(5.1,34.5) - | (8.1,37.5),(6.1,35.5) - | (3.1,36.5),(-2.9,24.5) - | (7.6,38),(7.6,37) - | (8.1,37.5),(8.1,37.5) - | (-3,-10),(-5,-12) - | (-2,-9),(-4,-11) - | (-7,-10),(-13,-22) - | (-2.5,-8.5),(-2.5,-9.5) - | (-2,-9),(-2,-9) - | (2,2),(1e-300,-1e-300) - | (3,3),(1,1) - | (-2,2),(-8,-10) - | (2.5,3.5),(2.5,2.5) - | (3,3),(3,3) - | (1e+300,Infinity),(1e+300,Infinity) - | (1e+300,Infinity),(1e+300,Infinity) - | (1e+300,Infinity),(1e+300,Infinity) - | (1e+300,Infinity),(1e+300,Infinity) - | (1e+300,Infinity),(1e+300,Infinity) - | (NaN,NaN),(NaN,NaN) - | (NaN,NaN),(NaN,NaN) - | (NaN,NaN),(NaN,NaN) - | (NaN,NaN),(NaN,NaN) - | (NaN,NaN),(NaN,NaN) - | (12,12),(10,10) - | (13,13),(11,11) - | (8,12),(2,0) - | (12.5,13.5),(12.5,12.5) - | (13,13),(13,13) -(45 rows) - -SELECT '' AS twentyfour, b.f1 - p.f1 AS translation - FROM BOX_TBL b, POINT_TBL p; - twentyfour | translation -------------+----------------------------------------- - | (2,2),(0,0) - | (3,3),(1,1) - | (-2,2),(-8,-10) - | (2.5,3.5),(2.5,2.5) - | (3,3),(3,3) - | (12,2),(10,0) - | (13,3),(11,1) - | (8,2),(2,-10) - | (12.5,3.5),(12.5,2.5) - | (13,3),(13,3) - | (5,-2),(3,-4) - | (6,-1),(4,-3) - | (1,-2),(-5,-14) - | (5.5,-0.5),(5.5,-1.5) - | (6,-1),(6,-1) - | (-3.1,-32.5),(-5.1,-34.5) - | (-2.1,-31.5),(-4.1,-33.5) - | (-7.1,-32.5),(-13.1,-44.5) - | (-2.6,-31),(-2.6,-32) - | (-2.1,-31.5),(-2.1,-31.5) - | (7,14),(5,12) - | (8,15),(6,13) - | (3,14),(-3,2) - | (7.5,15.5),(7.5,14.5) - | (8,15),(8,15) - | (2,2),(-1e-300,1e-300) - | (3,3),(1,1) - | (-2,2),(-8,-10) - | (2.5,3.5),(2.5,2.5) - | (3,3),(3,3) - | (-1e+300,-Infinity),(-1e+300,-Infinity) - | (-1e+300,-Infinity),(-1e+300,-Infinity) - | (-1e+300,-Infinity),(-1e+300,-Infinity) - | (-1e+300,-Infinity),(-1e+300,-Infinity) - | (-1e+300,-Infinity),(-1e+300,-Infinity) - | (NaN,NaN),(NaN,NaN) - | (NaN,NaN),(NaN,NaN) - | (NaN,NaN),(NaN,NaN) - | (NaN,NaN),(NaN,NaN) - | (NaN,NaN),(NaN,NaN) - | (-8,-8),(-10,-10) - | (-7,-7),(-9,-9) - | (-12,-8),(-18,-20) - | (-7.5,-6.5),(-7.5,-7.5) - | (-7,-7),(-7,-7) -(45 rows) - --- Multiply with point -SELECT b.f1, p.f1, b.f1 * p.f1 FROM BOX_TBL b, POINT_TBL p WHERE p.f1[0] BETWEEN 1 AND 1000; - f1 | f1 | ?column? ----------------------+------------+----------------------------- - (2,2),(0,0) | (5.1,34.5) | (0,79.2),(-58.8,0) - (2,2),(0,0) | (10,10) | (0,40),(0,0) - (3,3),(1,1) | (5.1,34.5) | (-29.4,118.8),(-88.2,39.6) - (3,3),(1,1) | (10,10) | (0,60),(0,20) - (-2,2),(-8,-10) | (5.1,34.5) | (304.2,-58.8),(-79.2,-327) - (-2,2),(-8,-10) | (10,10) | (20,0),(-40,-180) - (2.5,3.5),(2.5,2.5) | (5.1,34.5) | (-73.5,104.1),(-108,99) - (2.5,3.5),(2.5,2.5) | (10,10) | (0,60),(-10,50) - (3,3),(3,3) | (5.1,34.5) | (-88.2,118.8),(-88.2,118.8) - (3,3),(3,3) | (10,10) | (0,60),(0,60) -(10 rows) - --- Overflow error -SELECT b.f1, p.f1, b.f1 * p.f1 FROM BOX_TBL b, POINT_TBL p WHERE p.f1[0] > 1000; - f1 | f1 | ?column? ----------------------+-------------------+-------------------------------------------- - (2,2),(0,0) | (1e+300,Infinity) | (NaN,NaN),(-Infinity,Infinity) - (2,2),(0,0) | (NaN,NaN) | (NaN,NaN),(NaN,NaN) - (3,3),(1,1) | (1e+300,Infinity) | (-Infinity,Infinity),(-Infinity,Infinity) - (3,3),(1,1) | (NaN,NaN) | (NaN,NaN),(NaN,NaN) - (-2,2),(-8,-10) | (1e+300,Infinity) | (Infinity,-Infinity),(-Infinity,-Infinity) - (-2,2),(-8,-10) | (NaN,NaN) | (NaN,NaN),(NaN,NaN) - (2.5,3.5),(2.5,2.5) | (1e+300,Infinity) | (-Infinity,Infinity),(-Infinity,Infinity) - (2.5,3.5),(2.5,2.5) | (NaN,NaN) | (NaN,NaN),(NaN,NaN) - (3,3),(3,3) | (1e+300,Infinity) | (-Infinity,Infinity),(-Infinity,Infinity) - (3,3),(3,3) | (NaN,NaN) | (NaN,NaN),(NaN,NaN) -(10 rows) - --- Divide by point -SELECT b.f1, p.f1, b.f1 / p.f1 FROM BOX_TBL b, POINT_TBL p WHERE p.f1[0] BETWEEN 1 AND 1000; - f1 | f1 | ?column? ----------------------+------------+---------------------------------------------------------------------- - (2,2),(0,0) | (5.1,34.5) | (0.0651176557644,0),(0,-0.0483449262493) - (2,2),(0,0) | (10,10) | (0.2,0),(0,0) - (3,3),(1,1) | (5.1,34.5) | (0.0976764836466,-0.0241724631247),(0.0325588278822,-0.072517389374) - (3,3),(1,1) | (10,10) | (0.3,0),(0.1,0) - (-2,2),(-8,-10) | (5.1,34.5) | (0.0483449262493,0.18499334024),(-0.317201914064,0.0651176557644) - (-2,2),(-8,-10) | (10,10) | (0,0.2),(-0.9,-0.1) - (2.5,3.5),(2.5,2.5) | (5.1,34.5) | (0.109762715209,-0.0562379754329),(0.0813970697055,-0.0604311578117) - (2.5,3.5),(2.5,2.5) | (10,10) | (0.3,0.05),(0.25,0) - (3,3),(3,3) | (5.1,34.5) | (0.0976764836466,-0.072517389374),(0.0976764836466,-0.072517389374) - (3,3),(3,3) | (10,10) | (0.3,0),(0.3,0) -(10 rows) - --- To box -SELECT f1::box - FROM POINT_TBL; - f1 -------------------------------------- - (0,0),(0,0) - (-10,0),(-10,0) - (-3,4),(-3,4) - (5.1,34.5),(5.1,34.5) - (-5,-12),(-5,-12) - (1e-300,-1e-300),(1e-300,-1e-300) - (1e+300,Infinity),(1e+300,Infinity) - (NaN,NaN),(NaN,NaN) - (10,10),(10,10) -(9 rows) - -SELECT bound_box(a.f1, b.f1) - FROM BOX_TBL a, BOX_TBL b; - bound_box ---------------------- - (2,2),(0,0) - (3,3),(0,0) - (2,2),(-8,-10) - (2.5,3.5),(0,0) - (3,3),(0,0) - (3,3),(0,0) - (3,3),(1,1) - (3,3),(-8,-10) - (3,3.5),(1,1) - (3,3),(1,1) - (2,2),(-8,-10) - (3,3),(-8,-10) - (-2,2),(-8,-10) - (2.5,3.5),(-8,-10) - (3,3),(-8,-10) - (2.5,3.5),(0,0) - (3,3.5),(1,1) - (2.5,3.5),(-8,-10) - (2.5,3.5),(2.5,2.5) - (3,3.5),(2.5,2.5) - (3,3),(0,0) - (3,3),(1,1) - (3,3),(-8,-10) - (3,3.5),(2.5,2.5) - (3,3),(3,3) -(25 rows) - --- Below box -SELECT b1.f1, b2.f1, b1.f1 <^ b2.f1 FROM BOX_TBL b1, BOX_TBL b2; - f1 | f1 | ?column? ----------------------+---------------------+---------- - (2,2),(0,0) | (2,2),(0,0) | f - (2,2),(0,0) | (3,3),(1,1) | f - (2,2),(0,0) | (-2,2),(-8,-10) | f - (2,2),(0,0) | (2.5,3.5),(2.5,2.5) | t - (2,2),(0,0) | (3,3),(3,3) | t - (3,3),(1,1) | (2,2),(0,0) | f - (3,3),(1,1) | (3,3),(1,1) | f - (3,3),(1,1) | (-2,2),(-8,-10) | f - (3,3),(1,1) | (2.5,3.5),(2.5,2.5) | f - (3,3),(1,1) | (3,3),(3,3) | t - (-2,2),(-8,-10) | (2,2),(0,0) | f - (-2,2),(-8,-10) | (3,3),(1,1) | f - (-2,2),(-8,-10) | (-2,2),(-8,-10) | f - (-2,2),(-8,-10) | (2.5,3.5),(2.5,2.5) | t - (-2,2),(-8,-10) | (3,3),(3,3) | t - (2.5,3.5),(2.5,2.5) | (2,2),(0,0) | f - (2.5,3.5),(2.5,2.5) | (3,3),(1,1) | f - (2.5,3.5),(2.5,2.5) | (-2,2),(-8,-10) | f - (2.5,3.5),(2.5,2.5) | (2.5,3.5),(2.5,2.5) | f - (2.5,3.5),(2.5,2.5) | (3,3),(3,3) | f - (3,3),(3,3) | (2,2),(0,0) | f - (3,3),(3,3) | (3,3),(1,1) | f - (3,3),(3,3) | (-2,2),(-8,-10) | f - (3,3),(3,3) | (2.5,3.5),(2.5,2.5) | f - (3,3),(3,3) | (3,3),(3,3) | t -(25 rows) - --- Above box -SELECT b1.f1, b2.f1, b1.f1 >^ b2.f1 FROM BOX_TBL b1, BOX_TBL b2; - f1 | f1 | ?column? ----------------------+---------------------+---------- - (2,2),(0,0) | (2,2),(0,0) | f - (2,2),(0,0) | (3,3),(1,1) | f - (2,2),(0,0) | (-2,2),(-8,-10) | f - (2,2),(0,0) | (2.5,3.5),(2.5,2.5) | f - (2,2),(0,0) | (3,3),(3,3) | f - (3,3),(1,1) | (2,2),(0,0) | f - (3,3),(1,1) | (3,3),(1,1) | f - (3,3),(1,1) | (-2,2),(-8,-10) | f - (3,3),(1,1) | (2.5,3.5),(2.5,2.5) | f - (3,3),(1,1) | (3,3),(3,3) | f - (-2,2),(-8,-10) | (2,2),(0,0) | f - (-2,2),(-8,-10) | (3,3),(1,1) | f - (-2,2),(-8,-10) | (-2,2),(-8,-10) | f - (-2,2),(-8,-10) | (2.5,3.5),(2.5,2.5) | f - (-2,2),(-8,-10) | (3,3),(3,3) | f - (2.5,3.5),(2.5,2.5) | (2,2),(0,0) | t - (2.5,3.5),(2.5,2.5) | (3,3),(1,1) | f - (2.5,3.5),(2.5,2.5) | (-2,2),(-8,-10) | t - (2.5,3.5),(2.5,2.5) | (2.5,3.5),(2.5,2.5) | f - (2.5,3.5),(2.5,2.5) | (3,3),(3,3) | f - (3,3),(3,3) | (2,2),(0,0) | t - (3,3),(3,3) | (3,3),(1,1) | t - (3,3),(3,3) | (-2,2),(-8,-10) | t - (3,3),(3,3) | (2.5,3.5),(2.5,2.5) | f - (3,3),(3,3) | (3,3),(3,3) | t -(25 rows) - --- Intersection point with box -SELECT b1.f1, b2.f1, b1.f1 # b2.f1 FROM BOX_TBL b1, BOX_TBL b2; - f1 | f1 | ?column? ----------------------+---------------------+--------------------- - (2,2),(0,0) | (2,2),(0,0) | (2,2),(0,0) - (2,2),(0,0) | (3,3),(1,1) | (2,2),(1,1) - (2,2),(0,0) | (-2,2),(-8,-10) | - (2,2),(0,0) | (2.5,3.5),(2.5,2.5) | - (2,2),(0,0) | (3,3),(3,3) | - (3,3),(1,1) | (2,2),(0,0) | (2,2),(1,1) - (3,3),(1,1) | (3,3),(1,1) | (3,3),(1,1) - (3,3),(1,1) | (-2,2),(-8,-10) | - (3,3),(1,1) | (2.5,3.5),(2.5,2.5) | (2.5,3),(2.5,2.5) - (3,3),(1,1) | (3,3),(3,3) | (3,3),(3,3) - (-2,2),(-8,-10) | (2,2),(0,0) | - (-2,2),(-8,-10) | (3,3),(1,1) | - (-2,2),(-8,-10) | (-2,2),(-8,-10) | (-2,2),(-8,-10) - (-2,2),(-8,-10) | (2.5,3.5),(2.5,2.5) | - (-2,2),(-8,-10) | (3,3),(3,3) | - (2.5,3.5),(2.5,2.5) | (2,2),(0,0) | - (2.5,3.5),(2.5,2.5) | (3,3),(1,1) | (2.5,3),(2.5,2.5) - (2.5,3.5),(2.5,2.5) | (-2,2),(-8,-10) | - (2.5,3.5),(2.5,2.5) | (2.5,3.5),(2.5,2.5) | (2.5,3.5),(2.5,2.5) - (2.5,3.5),(2.5,2.5) | (3,3),(3,3) | - (3,3),(3,3) | (2,2),(0,0) | - (3,3),(3,3) | (3,3),(1,1) | (3,3),(3,3) - (3,3),(3,3) | (-2,2),(-8,-10) | - (3,3),(3,3) | (2.5,3.5),(2.5,2.5) | - (3,3),(3,3) | (3,3),(3,3) | (3,3),(3,3) -(25 rows) - --- Diagonal -SELECT f1, diagonal(f1) FROM BOX_TBL; - f1 | diagonal ----------------------+----------------------- - (2,2),(0,0) | [(2,2),(0,0)] - (3,3),(1,1) | [(3,3),(1,1)] - (-2,2),(-8,-10) | [(-2,2),(-8,-10)] - (2.5,3.5),(2.5,2.5) | [(2.5,3.5),(2.5,2.5)] - (3,3),(3,3) | [(3,3),(3,3)] -(5 rows) - --- Distance to box -SELECT b1.f1, b2.f1, b1.f1 <-> b2.f1 FROM BOX_TBL b1, BOX_TBL b2; - f1 | f1 | ?column? ----------------------+---------------------+--------------- - (2,2),(0,0) | (2,2),(0,0) | 0 - (2,2),(0,0) | (3,3),(1,1) | 1.41421356237 - (2,2),(0,0) | (-2,2),(-8,-10) | 7.81024967591 - (2,2),(0,0) | (2.5,3.5),(2.5,2.5) | 2.5 - (2,2),(0,0) | (3,3),(3,3) | 2.82842712475 - (3,3),(1,1) | (2,2),(0,0) | 1.41421356237 - (3,3),(1,1) | (3,3),(1,1) | 0 - (3,3),(1,1) | (-2,2),(-8,-10) | 9.21954445729 - (3,3),(1,1) | (2.5,3.5),(2.5,2.5) | 1.11803398875 - (3,3),(1,1) | (3,3),(3,3) | 1.41421356237 - (-2,2),(-8,-10) | (2,2),(0,0) | 7.81024967591 - (-2,2),(-8,-10) | (3,3),(1,1) | 9.21954445729 - (-2,2),(-8,-10) | (-2,2),(-8,-10) | 0 - (-2,2),(-8,-10) | (2.5,3.5),(2.5,2.5) | 10.2591422643 - (-2,2),(-8,-10) | (3,3),(3,3) | 10.6301458127 - (2.5,3.5),(2.5,2.5) | (2,2),(0,0) | 2.5 - (2.5,3.5),(2.5,2.5) | (3,3),(1,1) | 1.11803398875 - (2.5,3.5),(2.5,2.5) | (-2,2),(-8,-10) | 10.2591422643 - (2.5,3.5),(2.5,2.5) | (2.5,3.5),(2.5,2.5) | 0 - (2.5,3.5),(2.5,2.5) | (3,3),(3,3) | 0.5 - (3,3),(3,3) | (2,2),(0,0) | 2.82842712475 - (3,3),(3,3) | (3,3),(1,1) | 1.41421356237 - (3,3),(3,3) | (-2,2),(-8,-10) | 10.6301458127 - (3,3),(3,3) | (2.5,3.5),(2.5,2.5) | 0.5 - (3,3),(3,3) | (3,3),(3,3) | 0 -(25 rows) - --- --- Paths --- --- Points -SELECT f1, npoints(f1) FROM PATH_TBL; - f1 | npoints ----------------------------+--------- - [(1,2),(3,4)] | 2 - ((1,2),(3,4)) | 2 - [(0,0),(3,0),(4,5),(1,6)] | 4 - ((1,2),(3,4)) | 2 - ((1,2),(3,4)) | 2 - [(1,2),(3,4)] | 2 - ((10,20)) | 1 - [(11,12),(13,14)] | 2 - ((11,12),(13,14)) | 2 -(9 rows) - --- Area -SELECT f1, area(f1) FROM PATH_TBL; - f1 | area ----------------------------+------ - [(1,2),(3,4)] | - ((1,2),(3,4)) | 0 - [(0,0),(3,0),(4,5),(1,6)] | - ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | 0 - [(1,2),(3,4)] | - ((10,20)) | 0 - [(11,12),(13,14)] | - ((11,12),(13,14)) | 0 -(9 rows) - --- Length -SELECT f1, @-@ f1 FROM PATH_TBL; - f1 | ?column? ----------------------------+--------------- - [(1,2),(3,4)] | 2.82842712475 - ((1,2),(3,4)) | 5.65685424949 - [(0,0),(3,0),(4,5),(1,6)] | 11.2612971738 - ((1,2),(3,4)) | 5.65685424949 - ((1,2),(3,4)) | 5.65685424949 - [(1,2),(3,4)] | 2.82842712475 - ((10,20)) | 0 - [(11,12),(13,14)] | 2.82842712475 - ((11,12),(13,14)) | 5.65685424949 -(9 rows) - --- Center -SELECT f1, @@ f1 FROM PATH_TBL; -ERROR: function "path_center" not implemented --- To polygon -SELECT f1, f1::polygon FROM PATH_TBL WHERE isclosed(f1); - f1 | f1 --------------------+------------------- - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((10,20)) | ((10,20)) - ((11,12),(13,14)) | ((11,12),(13,14)) -(5 rows) - --- Open path cannot be converted to polygon error -SELECT f1, f1::polygon FROM PATH_TBL WHERE isopen(f1); -ERROR: open path cannot be converted to polygon --- Has points less than path -SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f1 < p2.f1; - f1 | f1 --------------------+--------------------------- - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] - ((10,20)) | [(1,2),(3,4)] - ((10,20)) | ((1,2),(3,4)) - ((10,20)) | [(0,0),(3,0),(4,5),(1,6)] - ((10,20)) | ((1,2),(3,4)) - ((10,20)) | ((1,2),(3,4)) - ((10,20)) | [(1,2),(3,4)] - ((10,20)) | [(11,12),(13,14)] - ((10,20)) | ((11,12),(13,14)) - [(11,12),(13,14)] | [(0,0),(3,0),(4,5),(1,6)] - ((11,12),(13,14)) | [(0,0),(3,0),(4,5),(1,6)] -(15 rows) - --- Has points less than or equal to path -SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f1 <= p2.f1; - f1 | f1 ----------------------------+--------------------------- - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | [(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - [(0,0),(3,0),(4,5),(1,6)] | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | [(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) - ((10,20)) | [(1,2),(3,4)] - ((10,20)) | ((1,2),(3,4)) - ((10,20)) | [(0,0),(3,0),(4,5),(1,6)] - ((10,20)) | ((1,2),(3,4)) - ((10,20)) | ((1,2),(3,4)) - ((10,20)) | [(1,2),(3,4)] - ((10,20)) | ((10,20)) - ((10,20)) | [(11,12),(13,14)] - ((10,20)) | ((11,12),(13,14)) - [(11,12),(13,14)] | [(1,2),(3,4)] - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | [(0,0),(3,0),(4,5),(1,6)] - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | [(1,2),(3,4)] - [(11,12),(13,14)] | [(11,12),(13,14)] - [(11,12),(13,14)] | ((11,12),(13,14)) - ((11,12),(13,14)) | [(1,2),(3,4)] - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | [(0,0),(3,0),(4,5),(1,6)] - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | [(1,2),(3,4)] - ((11,12),(13,14)) | [(11,12),(13,14)] - ((11,12),(13,14)) | ((11,12),(13,14)) -(66 rows) - --- Has points equal to path -SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f1 = p2.f1; - f1 | f1 ----------------------------+--------------------------- - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | [(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - [(0,0),(3,0),(4,5),(1,6)] | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | [(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) - ((10,20)) | ((10,20)) - [(11,12),(13,14)] | [(1,2),(3,4)] - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | [(1,2),(3,4)] - [(11,12),(13,14)] | [(11,12),(13,14)] - [(11,12),(13,14)] | ((11,12),(13,14)) - ((11,12),(13,14)) | [(1,2),(3,4)] - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | [(1,2),(3,4)] - ((11,12),(13,14)) | [(11,12),(13,14)] - ((11,12),(13,14)) | ((11,12),(13,14)) -(51 rows) - --- Has points greater than or equal to path -SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f1 >= p2.f1; - f1 | f1 ----------------------------+--------------------------- - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((10,20)) - [(1,2),(3,4)] | [(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((10,20)) - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | [(0,0),(3,0),(4,5),(1,6)] - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] - [(0,0),(3,0),(4,5),(1,6)] | ((10,20)) - [(0,0),(3,0),(4,5),(1,6)] | [(11,12),(13,14)] - [(0,0),(3,0),(4,5),(1,6)] | ((11,12),(13,14)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((10,20)) - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((10,20)) - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((10,20)) - [(1,2),(3,4)] | [(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) - ((10,20)) | ((10,20)) - [(11,12),(13,14)] | [(1,2),(3,4)] - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | [(1,2),(3,4)] - [(11,12),(13,14)] | ((10,20)) - [(11,12),(13,14)] | [(11,12),(13,14)] - [(11,12),(13,14)] | ((11,12),(13,14)) - ((11,12),(13,14)) | [(1,2),(3,4)] - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | [(1,2),(3,4)] - ((11,12),(13,14)) | ((10,20)) - ((11,12),(13,14)) | [(11,12),(13,14)] - ((11,12),(13,14)) | ((11,12),(13,14)) -(66 rows) - --- Has points greater than path -SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f1 > p2.f1; - f1 | f1 ----------------------------+------------------- - [(1,2),(3,4)] | ((10,20)) - ((1,2),(3,4)) | ((10,20)) - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] - [(0,0),(3,0),(4,5),(1,6)] | ((10,20)) - [(0,0),(3,0),(4,5),(1,6)] | [(11,12),(13,14)] - [(0,0),(3,0),(4,5),(1,6)] | ((11,12),(13,14)) - ((1,2),(3,4)) | ((10,20)) - ((1,2),(3,4)) | ((10,20)) - [(1,2),(3,4)] | ((10,20)) - [(11,12),(13,14)] | ((10,20)) - ((11,12),(13,14)) | ((10,20)) -(15 rows) - --- Add path -SELECT p1.f1, p2.f1, p1.f1 + p2.f1 FROM PATH_TBL p1, PATH_TBL p2; - f1 | f1 | ?column? ----------------------------+---------------------------+--------------------------------------------------- - [(1,2),(3,4)] | [(1,2),(3,4)] | [(1,2),(3,4),(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) | - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4),(0,0),(3,0),(4,5),(1,6)] - [(1,2),(3,4)] | ((1,2),(3,4)) | - [(1,2),(3,4)] | ((1,2),(3,4)) | - [(1,2),(3,4)] | [(1,2),(3,4)] | [(1,2),(3,4),(1,2),(3,4)] - [(1,2),(3,4)] | ((10,20)) | - [(1,2),(3,4)] | [(11,12),(13,14)] | [(1,2),(3,4),(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) | - ((1,2),(3,4)) | [(1,2),(3,4)] | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | [(1,2),(3,4)] | - ((1,2),(3,4)) | ((10,20)) | - ((1,2),(3,4)) | [(11,12),(13,14)] | - ((1,2),(3,4)) | ((11,12),(13,14)) | - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6),(1,2),(3,4)] - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) | - [(0,0),(3,0),(4,5),(1,6)] | [(0,0),(3,0),(4,5),(1,6)] | [(0,0),(3,0),(4,5),(1,6),(0,0),(3,0),(4,5),(1,6)] - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) | - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) | - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6),(1,2),(3,4)] - [(0,0),(3,0),(4,5),(1,6)] | ((10,20)) | - [(0,0),(3,0),(4,5),(1,6)] | [(11,12),(13,14)] | [(0,0),(3,0),(4,5),(1,6),(11,12),(13,14)] - [(0,0),(3,0),(4,5),(1,6)] | ((11,12),(13,14)) | - ((1,2),(3,4)) | [(1,2),(3,4)] | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | [(1,2),(3,4)] | - ((1,2),(3,4)) | ((10,20)) | - ((1,2),(3,4)) | [(11,12),(13,14)] | - ((1,2),(3,4)) | ((11,12),(13,14)) | - ((1,2),(3,4)) | [(1,2),(3,4)] | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | [(1,2),(3,4)] | - ((1,2),(3,4)) | ((10,20)) | - ((1,2),(3,4)) | [(11,12),(13,14)] | - ((1,2),(3,4)) | ((11,12),(13,14)) | - [(1,2),(3,4)] | [(1,2),(3,4)] | [(1,2),(3,4),(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) | - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4),(0,0),(3,0),(4,5),(1,6)] - [(1,2),(3,4)] | ((1,2),(3,4)) | - [(1,2),(3,4)] | ((1,2),(3,4)) | - [(1,2),(3,4)] | [(1,2),(3,4)] | [(1,2),(3,4),(1,2),(3,4)] - [(1,2),(3,4)] | ((10,20)) | - [(1,2),(3,4)] | [(11,12),(13,14)] | [(1,2),(3,4),(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) | - ((10,20)) | [(1,2),(3,4)] | - ((10,20)) | ((1,2),(3,4)) | - ((10,20)) | [(0,0),(3,0),(4,5),(1,6)] | - ((10,20)) | ((1,2),(3,4)) | - ((10,20)) | ((1,2),(3,4)) | - ((10,20)) | [(1,2),(3,4)] | - ((10,20)) | ((10,20)) | - ((10,20)) | [(11,12),(13,14)] | - ((10,20)) | ((11,12),(13,14)) | - [(11,12),(13,14)] | [(1,2),(3,4)] | [(11,12),(13,14),(1,2),(3,4)] - [(11,12),(13,14)] | ((1,2),(3,4)) | - [(11,12),(13,14)] | [(0,0),(3,0),(4,5),(1,6)] | [(11,12),(13,14),(0,0),(3,0),(4,5),(1,6)] - [(11,12),(13,14)] | ((1,2),(3,4)) | - [(11,12),(13,14)] | ((1,2),(3,4)) | - [(11,12),(13,14)] | [(1,2),(3,4)] | [(11,12),(13,14),(1,2),(3,4)] - [(11,12),(13,14)] | ((10,20)) | - [(11,12),(13,14)] | [(11,12),(13,14)] | [(11,12),(13,14),(11,12),(13,14)] - [(11,12),(13,14)] | ((11,12),(13,14)) | - ((11,12),(13,14)) | [(1,2),(3,4)] | - ((11,12),(13,14)) | ((1,2),(3,4)) | - ((11,12),(13,14)) | [(0,0),(3,0),(4,5),(1,6)] | - ((11,12),(13,14)) | ((1,2),(3,4)) | - ((11,12),(13,14)) | ((1,2),(3,4)) | - ((11,12),(13,14)) | [(1,2),(3,4)] | - ((11,12),(13,14)) | ((10,20)) | - ((11,12),(13,14)) | [(11,12),(13,14)] | - ((11,12),(13,14)) | ((11,12),(13,14)) | -(81 rows) - --- Add point -SELECT p.f1, p1.f1, p.f1 + p1.f1 FROM PATH_TBL p, POINT_TBL p1; - f1 | f1 | ?column? ----------------------------+-------------------+--------------------------------------------------------------------------- - [(1,2),(3,4)] | (0,0) | [(1,2),(3,4)] - ((1,2),(3,4)) | (0,0) | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | (0,0) | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | (0,0) | ((1,2),(3,4)) - ((1,2),(3,4)) | (0,0) | ((1,2),(3,4)) - [(1,2),(3,4)] | (0,0) | [(1,2),(3,4)] - ((10,20)) | (0,0) | ((10,20)) - [(11,12),(13,14)] | (0,0) | [(11,12),(13,14)] - ((11,12),(13,14)) | (0,0) | ((11,12),(13,14)) - [(1,2),(3,4)] | (-10,0) | [(-9,2),(-7,4)] - ((1,2),(3,4)) | (-10,0) | ((-9,2),(-7,4)) - [(0,0),(3,0),(4,5),(1,6)] | (-10,0) | [(-10,0),(-7,0),(-6,5),(-9,6)] - ((1,2),(3,4)) | (-10,0) | ((-9,2),(-7,4)) - ((1,2),(3,4)) | (-10,0) | ((-9,2),(-7,4)) - [(1,2),(3,4)] | (-10,0) | [(-9,2),(-7,4)] - ((10,20)) | (-10,0) | ((0,20)) - [(11,12),(13,14)] | (-10,0) | [(1,12),(3,14)] - ((11,12),(13,14)) | (-10,0) | ((1,12),(3,14)) - [(1,2),(3,4)] | (-3,4) | [(-2,6),(0,8)] - ((1,2),(3,4)) | (-3,4) | ((-2,6),(0,8)) - [(0,0),(3,0),(4,5),(1,6)] | (-3,4) | [(-3,4),(0,4),(1,9),(-2,10)] - ((1,2),(3,4)) | (-3,4) | ((-2,6),(0,8)) - ((1,2),(3,4)) | (-3,4) | ((-2,6),(0,8)) - [(1,2),(3,4)] | (-3,4) | [(-2,6),(0,8)] - ((10,20)) | (-3,4) | ((7,24)) - [(11,12),(13,14)] | (-3,4) | [(8,16),(10,18)] - ((11,12),(13,14)) | (-3,4) | ((8,16),(10,18)) - [(1,2),(3,4)] | (5.1,34.5) | [(6.1,36.5),(8.1,38.5)] - ((1,2),(3,4)) | (5.1,34.5) | ((6.1,36.5),(8.1,38.5)) - [(0,0),(3,0),(4,5),(1,6)] | (5.1,34.5) | [(5.1,34.5),(8.1,34.5),(9.1,39.5),(6.1,40.5)] - ((1,2),(3,4)) | (5.1,34.5) | ((6.1,36.5),(8.1,38.5)) - ((1,2),(3,4)) | (5.1,34.5) | ((6.1,36.5),(8.1,38.5)) - [(1,2),(3,4)] | (5.1,34.5) | [(6.1,36.5),(8.1,38.5)] - ((10,20)) | (5.1,34.5) | ((15.1,54.5)) - [(11,12),(13,14)] | (5.1,34.5) | [(16.1,46.5),(18.1,48.5)] - ((11,12),(13,14)) | (5.1,34.5) | ((16.1,46.5),(18.1,48.5)) - [(1,2),(3,4)] | (-5,-12) | [(-4,-10),(-2,-8)] - ((1,2),(3,4)) | (-5,-12) | ((-4,-10),(-2,-8)) - [(0,0),(3,0),(4,5),(1,6)] | (-5,-12) | [(-5,-12),(-2,-12),(-1,-7),(-4,-6)] - ((1,2),(3,4)) | (-5,-12) | ((-4,-10),(-2,-8)) - ((1,2),(3,4)) | (-5,-12) | ((-4,-10),(-2,-8)) - [(1,2),(3,4)] | (-5,-12) | [(-4,-10),(-2,-8)] - ((10,20)) | (-5,-12) | ((5,8)) - [(11,12),(13,14)] | (-5,-12) | [(6,0),(8,2)] - ((11,12),(13,14)) | (-5,-12) | ((6,0),(8,2)) - [(1,2),(3,4)] | (1e-300,-1e-300) | [(1,2),(3,4)] - ((1,2),(3,4)) | (1e-300,-1e-300) | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | (1e-300,-1e-300) | [(1e-300,-1e-300),(3,-1e-300),(4,5),(1,6)] - ((1,2),(3,4)) | (1e-300,-1e-300) | ((1,2),(3,4)) - ((1,2),(3,4)) | (1e-300,-1e-300) | ((1,2),(3,4)) - [(1,2),(3,4)] | (1e-300,-1e-300) | [(1,2),(3,4)] - ((10,20)) | (1e-300,-1e-300) | ((10,20)) - [(11,12),(13,14)] | (1e-300,-1e-300) | [(11,12),(13,14)] - ((11,12),(13,14)) | (1e-300,-1e-300) | ((11,12),(13,14)) - [(1,2),(3,4)] | (1e+300,Infinity) | [(1e+300,Infinity),(1e+300,Infinity)] - ((1,2),(3,4)) | (1e+300,Infinity) | ((1e+300,Infinity),(1e+300,Infinity)) - [(0,0),(3,0),(4,5),(1,6)] | (1e+300,Infinity) | [(1e+300,Infinity),(1e+300,Infinity),(1e+300,Infinity),(1e+300,Infinity)] - ((1,2),(3,4)) | (1e+300,Infinity) | ((1e+300,Infinity),(1e+300,Infinity)) - ((1,2),(3,4)) | (1e+300,Infinity) | ((1e+300,Infinity),(1e+300,Infinity)) - [(1,2),(3,4)] | (1e+300,Infinity) | [(1e+300,Infinity),(1e+300,Infinity)] - ((10,20)) | (1e+300,Infinity) | ((1e+300,Infinity)) - [(11,12),(13,14)] | (1e+300,Infinity) | [(1e+300,Infinity),(1e+300,Infinity)] - ((11,12),(13,14)) | (1e+300,Infinity) | ((1e+300,Infinity),(1e+300,Infinity)) - [(1,2),(3,4)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(0,0),(3,0),(4,5),(1,6)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN),(NaN,NaN),(NaN,NaN)] - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(1,2),(3,4)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((10,20)) | (NaN,NaN) | ((NaN,NaN)) - [(11,12),(13,14)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((11,12),(13,14)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(1,2),(3,4)] | (10,10) | [(11,12),(13,14)] - ((1,2),(3,4)) | (10,10) | ((11,12),(13,14)) - [(0,0),(3,0),(4,5),(1,6)] | (10,10) | [(10,10),(13,10),(14,15),(11,16)] - ((1,2),(3,4)) | (10,10) | ((11,12),(13,14)) - ((1,2),(3,4)) | (10,10) | ((11,12),(13,14)) - [(1,2),(3,4)] | (10,10) | [(11,12),(13,14)] - ((10,20)) | (10,10) | ((20,30)) - [(11,12),(13,14)] | (10,10) | [(21,22),(23,24)] - ((11,12),(13,14)) | (10,10) | ((21,22),(23,24)) -(81 rows) - --- Subtract point -SELECT p.f1, p1.f1, p.f1 - p1.f1 FROM PATH_TBL p, POINT_TBL p1; - f1 | f1 | ?column? ----------------------------+-------------------+----------------------------------------------------------------------------------- - [(1,2),(3,4)] | (0,0) | [(1,2),(3,4)] - ((1,2),(3,4)) | (0,0) | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | (0,0) | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | (0,0) | ((1,2),(3,4)) - ((1,2),(3,4)) | (0,0) | ((1,2),(3,4)) - [(1,2),(3,4)] | (0,0) | [(1,2),(3,4)] - ((10,20)) | (0,0) | ((10,20)) - [(11,12),(13,14)] | (0,0) | [(11,12),(13,14)] - ((11,12),(13,14)) | (0,0) | ((11,12),(13,14)) - [(1,2),(3,4)] | (-10,0) | [(11,2),(13,4)] - ((1,2),(3,4)) | (-10,0) | ((11,2),(13,4)) - [(0,0),(3,0),(4,5),(1,6)] | (-10,0) | [(10,0),(13,0),(14,5),(11,6)] - ((1,2),(3,4)) | (-10,0) | ((11,2),(13,4)) - ((1,2),(3,4)) | (-10,0) | ((11,2),(13,4)) - [(1,2),(3,4)] | (-10,0) | [(11,2),(13,4)] - ((10,20)) | (-10,0) | ((20,20)) - [(11,12),(13,14)] | (-10,0) | [(21,12),(23,14)] - ((11,12),(13,14)) | (-10,0) | ((21,12),(23,14)) - [(1,2),(3,4)] | (-3,4) | [(4,-2),(6,0)] - ((1,2),(3,4)) | (-3,4) | ((4,-2),(6,0)) - [(0,0),(3,0),(4,5),(1,6)] | (-3,4) | [(3,-4),(6,-4),(7,1),(4,2)] - ((1,2),(3,4)) | (-3,4) | ((4,-2),(6,0)) - ((1,2),(3,4)) | (-3,4) | ((4,-2),(6,0)) - [(1,2),(3,4)] | (-3,4) | [(4,-2),(6,0)] - ((10,20)) | (-3,4) | ((13,16)) - [(11,12),(13,14)] | (-3,4) | [(14,8),(16,10)] - ((11,12),(13,14)) | (-3,4) | ((14,8),(16,10)) - [(1,2),(3,4)] | (5.1,34.5) | [(-4.1,-32.5),(-2.1,-30.5)] - ((1,2),(3,4)) | (5.1,34.5) | ((-4.1,-32.5),(-2.1,-30.5)) - [(0,0),(3,0),(4,5),(1,6)] | (5.1,34.5) | [(-5.1,-34.5),(-2.1,-34.5),(-1.1,-29.5),(-4.1,-28.5)] - ((1,2),(3,4)) | (5.1,34.5) | ((-4.1,-32.5),(-2.1,-30.5)) - ((1,2),(3,4)) | (5.1,34.5) | ((-4.1,-32.5),(-2.1,-30.5)) - [(1,2),(3,4)] | (5.1,34.5) | [(-4.1,-32.5),(-2.1,-30.5)] - ((10,20)) | (5.1,34.5) | ((4.9,-14.5)) - [(11,12),(13,14)] | (5.1,34.5) | [(5.9,-22.5),(7.9,-20.5)] - ((11,12),(13,14)) | (5.1,34.5) | ((5.9,-22.5),(7.9,-20.5)) - [(1,2),(3,4)] | (-5,-12) | [(6,14),(8,16)] - ((1,2),(3,4)) | (-5,-12) | ((6,14),(8,16)) - [(0,0),(3,0),(4,5),(1,6)] | (-5,-12) | [(5,12),(8,12),(9,17),(6,18)] - ((1,2),(3,4)) | (-5,-12) | ((6,14),(8,16)) - ((1,2),(3,4)) | (-5,-12) | ((6,14),(8,16)) - [(1,2),(3,4)] | (-5,-12) | [(6,14),(8,16)] - ((10,20)) | (-5,-12) | ((15,32)) - [(11,12),(13,14)] | (-5,-12) | [(16,24),(18,26)] - ((11,12),(13,14)) | (-5,-12) | ((16,24),(18,26)) - [(1,2),(3,4)] | (1e-300,-1e-300) | [(1,2),(3,4)] - ((1,2),(3,4)) | (1e-300,-1e-300) | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | (1e-300,-1e-300) | [(-1e-300,1e-300),(3,1e-300),(4,5),(1,6)] - ((1,2),(3,4)) | (1e-300,-1e-300) | ((1,2),(3,4)) - ((1,2),(3,4)) | (1e-300,-1e-300) | ((1,2),(3,4)) - [(1,2),(3,4)] | (1e-300,-1e-300) | [(1,2),(3,4)] - ((10,20)) | (1e-300,-1e-300) | ((10,20)) - [(11,12),(13,14)] | (1e-300,-1e-300) | [(11,12),(13,14)] - ((11,12),(13,14)) | (1e-300,-1e-300) | ((11,12),(13,14)) - [(1,2),(3,4)] | (1e+300,Infinity) | [(-1e+300,-Infinity),(-1e+300,-Infinity)] - ((1,2),(3,4)) | (1e+300,Infinity) | ((-1e+300,-Infinity),(-1e+300,-Infinity)) - [(0,0),(3,0),(4,5),(1,6)] | (1e+300,Infinity) | [(-1e+300,-Infinity),(-1e+300,-Infinity),(-1e+300,-Infinity),(-1e+300,-Infinity)] - ((1,2),(3,4)) | (1e+300,Infinity) | ((-1e+300,-Infinity),(-1e+300,-Infinity)) - ((1,2),(3,4)) | (1e+300,Infinity) | ((-1e+300,-Infinity),(-1e+300,-Infinity)) - [(1,2),(3,4)] | (1e+300,Infinity) | [(-1e+300,-Infinity),(-1e+300,-Infinity)] - ((10,20)) | (1e+300,Infinity) | ((-1e+300,-Infinity)) - [(11,12),(13,14)] | (1e+300,Infinity) | [(-1e+300,-Infinity),(-1e+300,-Infinity)] - ((11,12),(13,14)) | (1e+300,Infinity) | ((-1e+300,-Infinity),(-1e+300,-Infinity)) - [(1,2),(3,4)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(0,0),(3,0),(4,5),(1,6)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN),(NaN,NaN),(NaN,NaN)] - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(1,2),(3,4)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((10,20)) | (NaN,NaN) | ((NaN,NaN)) - [(11,12),(13,14)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((11,12),(13,14)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(1,2),(3,4)] | (10,10) | [(-9,-8),(-7,-6)] - ((1,2),(3,4)) | (10,10) | ((-9,-8),(-7,-6)) - [(0,0),(3,0),(4,5),(1,6)] | (10,10) | [(-10,-10),(-7,-10),(-6,-5),(-9,-4)] - ((1,2),(3,4)) | (10,10) | ((-9,-8),(-7,-6)) - ((1,2),(3,4)) | (10,10) | ((-9,-8),(-7,-6)) - [(1,2),(3,4)] | (10,10) | [(-9,-8),(-7,-6)] - ((10,20)) | (10,10) | ((0,10)) - [(11,12),(13,14)] | (10,10) | [(1,2),(3,4)] - ((11,12),(13,14)) | (10,10) | ((1,2),(3,4)) -(81 rows) - --- Multiply with point -SELECT p.f1, p1.f1, p.f1 * p1.f1 FROM PATH_TBL p, POINT_TBL p1; - f1 | f1 | ?column? ----------------------------+-------------------+---------------------------------------------------------------------- - [(1,2),(3,4)] | (0,0) | [(0,0),(0,0)] - ((1,2),(3,4)) | (0,0) | ((0,0),(0,0)) - [(0,0),(3,0),(4,5),(1,6)] | (0,0) | [(0,0),(0,0),(0,0),(0,0)] - ((1,2),(3,4)) | (0,0) | ((0,0),(0,0)) - ((1,2),(3,4)) | (0,0) | ((0,0),(0,0)) - [(1,2),(3,4)] | (0,0) | [(0,0),(0,0)] - ((10,20)) | (0,0) | ((0,0)) - [(11,12),(13,14)] | (0,0) | [(0,0),(0,0)] - ((11,12),(13,14)) | (0,0) | ((0,0),(0,0)) - [(1,2),(3,4)] | (-10,0) | [(-10,-20),(-30,-40)] - ((1,2),(3,4)) | (-10,0) | ((-10,-20),(-30,-40)) - [(0,0),(3,0),(4,5),(1,6)] | (-10,0) | [(-0,0),(-30,0),(-40,-50),(-10,-60)] - ((1,2),(3,4)) | (-10,0) | ((-10,-20),(-30,-40)) - ((1,2),(3,4)) | (-10,0) | ((-10,-20),(-30,-40)) - [(1,2),(3,4)] | (-10,0) | [(-10,-20),(-30,-40)] - ((10,20)) | (-10,0) | ((-100,-200)) - [(11,12),(13,14)] | (-10,0) | [(-110,-120),(-130,-140)] - ((11,12),(13,14)) | (-10,0) | ((-110,-120),(-130,-140)) - [(1,2),(3,4)] | (-3,4) | [(-11,-2),(-25,0)] - ((1,2),(3,4)) | (-3,4) | ((-11,-2),(-25,0)) - [(0,0),(3,0),(4,5),(1,6)] | (-3,4) | [(-0,0),(-9,12),(-32,1),(-27,-14)] - ((1,2),(3,4)) | (-3,4) | ((-11,-2),(-25,0)) - ((1,2),(3,4)) | (-3,4) | ((-11,-2),(-25,0)) - [(1,2),(3,4)] | (-3,4) | [(-11,-2),(-25,0)] - ((10,20)) | (-3,4) | ((-110,-20)) - [(11,12),(13,14)] | (-3,4) | [(-81,8),(-95,10)] - ((11,12),(13,14)) | (-3,4) | ((-81,8),(-95,10)) - [(1,2),(3,4)] | (5.1,34.5) | [(-63.9,44.7),(-122.7,123.9)] - ((1,2),(3,4)) | (5.1,34.5) | ((-63.9,44.7),(-122.7,123.9)) - [(0,0),(3,0),(4,5),(1,6)] | (5.1,34.5) | [(0,0),(15.3,103.5),(-152.1,163.5),(-201.9,65.1)] - ((1,2),(3,4)) | (5.1,34.5) | ((-63.9,44.7),(-122.7,123.9)) - ((1,2),(3,4)) | (5.1,34.5) | ((-63.9,44.7),(-122.7,123.9)) - [(1,2),(3,4)] | (5.1,34.5) | [(-63.9,44.7),(-122.7,123.9)] - ((10,20)) | (5.1,34.5) | ((-639,447)) - [(11,12),(13,14)] | (5.1,34.5) | [(-357.9,440.7),(-416.7,519.9)] - ((11,12),(13,14)) | (5.1,34.5) | ((-357.9,440.7),(-416.7,519.9)) - [(1,2),(3,4)] | (-5,-12) | [(19,-22),(33,-56)] - ((1,2),(3,4)) | (-5,-12) | ((19,-22),(33,-56)) - [(0,0),(3,0),(4,5),(1,6)] | (-5,-12) | [(0,-0),(-15,-36),(40,-73),(67,-42)] - ((1,2),(3,4)) | (-5,-12) | ((19,-22),(33,-56)) - ((1,2),(3,4)) | (-5,-12) | ((19,-22),(33,-56)) - [(1,2),(3,4)] | (-5,-12) | [(19,-22),(33,-56)] - ((10,20)) | (-5,-12) | ((190,-220)) - [(11,12),(13,14)] | (-5,-12) | [(89,-192),(103,-226)] - ((11,12),(13,14)) | (-5,-12) | ((89,-192),(103,-226)) - [(1,2),(3,4)] | (1e-300,-1e-300) | [(3e-300,1e-300),(7e-300,1e-300)] - ((1,2),(3,4)) | (1e-300,-1e-300) | ((3e-300,1e-300),(7e-300,1e-300)) - [(0,0),(3,0),(4,5),(1,6)] | (1e-300,-1e-300) | [(0,0),(3e-300,-3e-300),(9e-300,1e-300),(7e-300,5e-300)] - ((1,2),(3,4)) | (1e-300,-1e-300) | ((3e-300,1e-300),(7e-300,1e-300)) - ((1,2),(3,4)) | (1e-300,-1e-300) | ((3e-300,1e-300),(7e-300,1e-300)) - [(1,2),(3,4)] | (1e-300,-1e-300) | [(3e-300,1e-300),(7e-300,1e-300)] - ((10,20)) | (1e-300,-1e-300) | ((3e-299,1e-299)) - [(11,12),(13,14)] | (1e-300,-1e-300) | [(2.3e-299,1e-300),(2.7e-299,1e-300)] - ((11,12),(13,14)) | (1e-300,-1e-300) | ((2.3e-299,1e-300),(2.7e-299,1e-300)) - [(1,2),(3,4)] | (1e+300,Infinity) | [(-Infinity,Infinity),(-Infinity,Infinity)] - ((1,2),(3,4)) | (1e+300,Infinity) | ((-Infinity,Infinity),(-Infinity,Infinity)) - [(0,0),(3,0),(4,5),(1,6)] | (1e+300,Infinity) | [(NaN,NaN),(NaN,Infinity),(-Infinity,Infinity),(-Infinity,Infinity)] - ((1,2),(3,4)) | (1e+300,Infinity) | ((-Infinity,Infinity),(-Infinity,Infinity)) - ((1,2),(3,4)) | (1e+300,Infinity) | ((-Infinity,Infinity),(-Infinity,Infinity)) - [(1,2),(3,4)] | (1e+300,Infinity) | [(-Infinity,Infinity),(-Infinity,Infinity)] - ((10,20)) | (1e+300,Infinity) | ((-Infinity,Infinity)) - [(11,12),(13,14)] | (1e+300,Infinity) | [(-Infinity,Infinity),(-Infinity,Infinity)] - ((11,12),(13,14)) | (1e+300,Infinity) | ((-Infinity,Infinity),(-Infinity,Infinity)) - [(1,2),(3,4)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(0,0),(3,0),(4,5),(1,6)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN),(NaN,NaN),(NaN,NaN)] - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(1,2),(3,4)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((10,20)) | (NaN,NaN) | ((NaN,NaN)) - [(11,12),(13,14)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((11,12),(13,14)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(1,2),(3,4)] | (10,10) | [(-10,30),(-10,70)] - ((1,2),(3,4)) | (10,10) | ((-10,30),(-10,70)) - [(0,0),(3,0),(4,5),(1,6)] | (10,10) | [(0,0),(30,30),(-10,90),(-50,70)] - ((1,2),(3,4)) | (10,10) | ((-10,30),(-10,70)) - ((1,2),(3,4)) | (10,10) | ((-10,30),(-10,70)) - [(1,2),(3,4)] | (10,10) | [(-10,30),(-10,70)] - ((10,20)) | (10,10) | ((-100,300)) - [(11,12),(13,14)] | (10,10) | [(-10,230),(-10,270)] - ((11,12),(13,14)) | (10,10) | ((-10,230),(-10,270)) -(81 rows) - --- Divide by point -SELECT p.f1, p1.f1, p.f1 / p1.f1 FROM PATH_TBL p, POINT_TBL p1 WHERE p1.f1[0] BETWEEN 1 AND 1000; - f1 | f1 | ?column? ----------------------------+------------+----------------------------------------------------------------------------------------------------------------- - [(1,2),(3,4)] | (5.1,34.5) | [(0.0609244733856,-0.0199792807459),(0.12604212915,-0.0683242069952)] - [(1,2),(3,4)] | (10,10) | [(0.15,0.05),(0.35,0.05)] - ((1,2),(3,4)) | (5.1,34.5) | ((0.0609244733856,-0.0199792807459),(0.12604212915,-0.0683242069952)) - ((1,2),(3,4)) | (10,10) | ((0.15,0.05),(0.35,0.05)) - [(0,0),(3,0),(4,5),(1,6)] | (5.1,34.5) | [(0,0),(0.0125795471363,-0.0850969365103),(0.158600957032,-0.0924966701199),(0.174387055399,-0.00320655123082)] - [(0,0),(3,0),(4,5),(1,6)] | (10,10) | [(0,0),(0.15,-0.15),(0.45,0.05),(0.35,0.25)] - ((1,2),(3,4)) | (5.1,34.5) | ((0.0609244733856,-0.0199792807459),(0.12604212915,-0.0683242069952)) - ((1,2),(3,4)) | (10,10) | ((0.15,0.05),(0.35,0.05)) - ((1,2),(3,4)) | (5.1,34.5) | ((0.0609244733856,-0.0199792807459),(0.12604212915,-0.0683242069952)) - ((1,2),(3,4)) | (10,10) | ((0.15,0.05),(0.35,0.05)) - [(1,2),(3,4)] | (5.1,34.5) | [(0.0609244733856,-0.0199792807459),(0.12604212915,-0.0683242069952)] - [(1,2),(3,4)] | (10,10) | [(0.15,0.05),(0.35,0.05)] - ((10,20)) | (5.1,34.5) | ((0.609244733856,-0.199792807459)) - ((10,20)) | (10,10) | ((1.5,0.5)) - [(11,12),(13,14)] | (5.1,34.5) | [(0.386512752208,-0.261703911993),(0.451630407972,-0.310048838242)] - [(11,12),(13,14)] | (10,10) | [(1.15,0.05),(1.35,0.05)] - ((11,12),(13,14)) | (5.1,34.5) | ((0.386512752208,-0.261703911993),(0.451630407972,-0.310048838242)) - ((11,12),(13,14)) | (10,10) | ((1.15,0.05),(1.35,0.05)) -(18 rows) - --- Division by 0 error -SELECT p.f1, p1.f1, p.f1 / p1.f1 FROM PATH_TBL p, POINT_TBL p1 WHERE p1.f1 ~= '(0,0)'::point; -ERROR: division by zero --- Distance to path -SELECT p1.f1, p2.f1, p1.f1 <-> p2.f1 FROM PATH_TBL p1, PATH_TBL p2; - f1 | f1 | ?column? ----------------------------+---------------------------+---------------- - [(1,2),(3,4)] | [(1,2),(3,4)] | 0 - [(1,2),(3,4)] | ((1,2),(3,4)) | 0 - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] | 0.784464540553 - [(1,2),(3,4)] | ((1,2),(3,4)) | 0 - [(1,2),(3,4)] | ((1,2),(3,4)) | 0 - [(1,2),(3,4)] | [(1,2),(3,4)] | 0 - [(1,2),(3,4)] | ((10,20)) | 17.4642491966 - [(1,2),(3,4)] | [(11,12),(13,14)] | 11.313708499 - [(1,2),(3,4)] | ((11,12),(13,14)) | 11.313708499 - ((1,2),(3,4)) | [(1,2),(3,4)] | 0 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] | 0.784464540553 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | [(1,2),(3,4)] | 0 - ((1,2),(3,4)) | ((10,20)) | 17.4642491966 - ((1,2),(3,4)) | [(11,12),(13,14)] | 11.313708499 - ((1,2),(3,4)) | ((11,12),(13,14)) | 11.313708499 - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] | 0.784464540553 - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) | 0.784464540553 - [(0,0),(3,0),(4,5),(1,6)] | [(0,0),(3,0),(4,5),(1,6)] | 0 - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) | 0.784464540553 - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) | 0.784464540553 - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] | 0.784464540553 - [(0,0),(3,0),(4,5),(1,6)] | ((10,20)) | 16.1554944214 - [(0,0),(3,0),(4,5),(1,6)] | [(11,12),(13,14)] | 9.89949493661 - [(0,0),(3,0),(4,5),(1,6)] | ((11,12),(13,14)) | 9.89949493661 - ((1,2),(3,4)) | [(1,2),(3,4)] | 0 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] | 0.784464540553 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | [(1,2),(3,4)] | 0 - ((1,2),(3,4)) | ((10,20)) | 17.4642491966 - ((1,2),(3,4)) | [(11,12),(13,14)] | 11.313708499 - ((1,2),(3,4)) | ((11,12),(13,14)) | 11.313708499 - ((1,2),(3,4)) | [(1,2),(3,4)] | 0 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] | 0.784464540553 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | [(1,2),(3,4)] | 0 - ((1,2),(3,4)) | ((10,20)) | 17.4642491966 - ((1,2),(3,4)) | [(11,12),(13,14)] | 11.313708499 - ((1,2),(3,4)) | ((11,12),(13,14)) | 11.313708499 - [(1,2),(3,4)] | [(1,2),(3,4)] | 0 - [(1,2),(3,4)] | ((1,2),(3,4)) | 0 - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] | 0.784464540553 - [(1,2),(3,4)] | ((1,2),(3,4)) | 0 - [(1,2),(3,4)] | ((1,2),(3,4)) | 0 - [(1,2),(3,4)] | [(1,2),(3,4)] | 0 - [(1,2),(3,4)] | ((10,20)) | 17.4642491966 - [(1,2),(3,4)] | [(11,12),(13,14)] | 11.313708499 - [(1,2),(3,4)] | ((11,12),(13,14)) | 11.313708499 - ((10,20)) | [(1,2),(3,4)] | 17.4642491966 - ((10,20)) | ((1,2),(3,4)) | 17.4642491966 - ((10,20)) | [(0,0),(3,0),(4,5),(1,6)] | 16.1554944214 - ((10,20)) | ((1,2),(3,4)) | 17.4642491966 - ((10,20)) | ((1,2),(3,4)) | 17.4642491966 - ((10,20)) | [(1,2),(3,4)] | 17.4642491966 - ((10,20)) | ((10,20)) | 0 - ((10,20)) | [(11,12),(13,14)] | 6.7082039325 - ((10,20)) | ((11,12),(13,14)) | 6.7082039325 - [(11,12),(13,14)] | [(1,2),(3,4)] | 11.313708499 - [(11,12),(13,14)] | ((1,2),(3,4)) | 11.313708499 - [(11,12),(13,14)] | [(0,0),(3,0),(4,5),(1,6)] | 9.89949493661 - [(11,12),(13,14)] | ((1,2),(3,4)) | 11.313708499 - [(11,12),(13,14)] | ((1,2),(3,4)) | 11.313708499 - [(11,12),(13,14)] | [(1,2),(3,4)] | 11.313708499 - [(11,12),(13,14)] | ((10,20)) | 6.7082039325 - [(11,12),(13,14)] | [(11,12),(13,14)] | 0 - [(11,12),(13,14)] | ((11,12),(13,14)) | 0 - ((11,12),(13,14)) | [(1,2),(3,4)] | 11.313708499 - ((11,12),(13,14)) | ((1,2),(3,4)) | 11.313708499 - ((11,12),(13,14)) | [(0,0),(3,0),(4,5),(1,6)] | 9.89949493661 - ((11,12),(13,14)) | ((1,2),(3,4)) | 11.313708499 - ((11,12),(13,14)) | ((1,2),(3,4)) | 11.313708499 - ((11,12),(13,14)) | [(1,2),(3,4)] | 11.313708499 - ((11,12),(13,14)) | ((10,20)) | 6.7082039325 - ((11,12),(13,14)) | [(11,12),(13,14)] | 0 - ((11,12),(13,14)) | ((11,12),(13,14)) | 0 -(81 rows) - --- --- Polygons --- --- containment -SELECT '' AS twentyfour, p.f1, poly.f1, poly.f1 @> p.f1 AS contains - FROM POLYGON_TBL poly, POINT_TBL p; - twentyfour | f1 | f1 | contains -------------+-------------------+----------------------------+---------- - | (0,0) | ((2,0),(2,4),(0,0)) | t - | (0,0) | ((3,1),(3,3),(1,0)) | f - | (0,0) | ((1,2),(3,4),(5,6),(7,8)) | f - | (0,0) | ((7,8),(5,6),(3,4),(1,2)) | f - | (0,0) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (0,0) | ((0,0)) | t - | (0,0) | ((0,1),(0,1)) | f - | (-10,0) | ((2,0),(2,4),(0,0)) | f - | (-10,0) | ((3,1),(3,3),(1,0)) | f - | (-10,0) | ((1,2),(3,4),(5,6),(7,8)) | f - | (-10,0) | ((7,8),(5,6),(3,4),(1,2)) | f - | (-10,0) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (-10,0) | ((0,0)) | f - | (-10,0) | ((0,1),(0,1)) | f - | (-3,4) | ((2,0),(2,4),(0,0)) | f - | (-3,4) | ((3,1),(3,3),(1,0)) | f - | (-3,4) | ((1,2),(3,4),(5,6),(7,8)) | f - | (-3,4) | ((7,8),(5,6),(3,4),(1,2)) | f - | (-3,4) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (-3,4) | ((0,0)) | f - | (-3,4) | ((0,1),(0,1)) | f - | (5.1,34.5) | ((2,0),(2,4),(0,0)) | f - | (5.1,34.5) | ((3,1),(3,3),(1,0)) | f - | (5.1,34.5) | ((1,2),(3,4),(5,6),(7,8)) | f - | (5.1,34.5) | ((7,8),(5,6),(3,4),(1,2)) | f - | (5.1,34.5) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (5.1,34.5) | ((0,0)) | f - | (5.1,34.5) | ((0,1),(0,1)) | f - | (-5,-12) | ((2,0),(2,4),(0,0)) | f - | (-5,-12) | ((3,1),(3,3),(1,0)) | f - | (-5,-12) | ((1,2),(3,4),(5,6),(7,8)) | f - | (-5,-12) | ((7,8),(5,6),(3,4),(1,2)) | f - | (-5,-12) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (-5,-12) | ((0,0)) | f - | (-5,-12) | ((0,1),(0,1)) | f - | (1e-300,-1e-300) | ((2,0),(2,4),(0,0)) | t - | (1e-300,-1e-300) | ((3,1),(3,3),(1,0)) | f - | (1e-300,-1e-300) | ((1,2),(3,4),(5,6),(7,8)) | f - | (1e-300,-1e-300) | ((7,8),(5,6),(3,4),(1,2)) | f - | (1e-300,-1e-300) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (1e-300,-1e-300) | ((0,0)) | t - | (1e-300,-1e-300) | ((0,1),(0,1)) | f - | (1e+300,Infinity) | ((2,0),(2,4),(0,0)) | f - | (1e+300,Infinity) | ((3,1),(3,3),(1,0)) | f - | (1e+300,Infinity) | ((1,2),(3,4),(5,6),(7,8)) | f - | (1e+300,Infinity) | ((7,8),(5,6),(3,4),(1,2)) | f - | (1e+300,Infinity) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (1e+300,Infinity) | ((0,0)) | f - | (1e+300,Infinity) | ((0,1),(0,1)) | f - | (NaN,NaN) | ((2,0),(2,4),(0,0)) | t - | (NaN,NaN) | ((3,1),(3,3),(1,0)) | t - | (NaN,NaN) | ((1,2),(3,4),(5,6),(7,8)) | t - | (NaN,NaN) | ((7,8),(5,6),(3,4),(1,2)) | t - | (NaN,NaN) | ((1,2),(7,8),(5,6),(3,-4)) | t - | (NaN,NaN) | ((0,0)) | t - | (NaN,NaN) | ((0,1),(0,1)) | t - | (10,10) | ((2,0),(2,4),(0,0)) | f - | (10,10) | ((3,1),(3,3),(1,0)) | f - | (10,10) | ((1,2),(3,4),(5,6),(7,8)) | f - | (10,10) | ((7,8),(5,6),(3,4),(1,2)) | f - | (10,10) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (10,10) | ((0,0)) | f - | (10,10) | ((0,1),(0,1)) | f -(63 rows) - -SELECT '' AS twentyfour, p.f1, poly.f1, p.f1 <@ poly.f1 AS contained - FROM POLYGON_TBL poly, POINT_TBL p; - twentyfour | f1 | f1 | contained -------------+-------------------+----------------------------+----------- - | (0,0) | ((2,0),(2,4),(0,0)) | t - | (0,0) | ((3,1),(3,3),(1,0)) | f - | (0,0) | ((1,2),(3,4),(5,6),(7,8)) | f - | (0,0) | ((7,8),(5,6),(3,4),(1,2)) | f - | (0,0) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (0,0) | ((0,0)) | t - | (0,0) | ((0,1),(0,1)) | f - | (-10,0) | ((2,0),(2,4),(0,0)) | f - | (-10,0) | ((3,1),(3,3),(1,0)) | f - | (-10,0) | ((1,2),(3,4),(5,6),(7,8)) | f - | (-10,0) | ((7,8),(5,6),(3,4),(1,2)) | f - | (-10,0) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (-10,0) | ((0,0)) | f - | (-10,0) | ((0,1),(0,1)) | f - | (-3,4) | ((2,0),(2,4),(0,0)) | f - | (-3,4) | ((3,1),(3,3),(1,0)) | f - | (-3,4) | ((1,2),(3,4),(5,6),(7,8)) | f - | (-3,4) | ((7,8),(5,6),(3,4),(1,2)) | f - | (-3,4) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (-3,4) | ((0,0)) | f - | (-3,4) | ((0,1),(0,1)) | f - | (5.1,34.5) | ((2,0),(2,4),(0,0)) | f - | (5.1,34.5) | ((3,1),(3,3),(1,0)) | f - | (5.1,34.5) | ((1,2),(3,4),(5,6),(7,8)) | f - | (5.1,34.5) | ((7,8),(5,6),(3,4),(1,2)) | f - | (5.1,34.5) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (5.1,34.5) | ((0,0)) | f - | (5.1,34.5) | ((0,1),(0,1)) | f - | (-5,-12) | ((2,0),(2,4),(0,0)) | f - | (-5,-12) | ((3,1),(3,3),(1,0)) | f - | (-5,-12) | ((1,2),(3,4),(5,6),(7,8)) | f - | (-5,-12) | ((7,8),(5,6),(3,4),(1,2)) | f - | (-5,-12) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (-5,-12) | ((0,0)) | f - | (-5,-12) | ((0,1),(0,1)) | f - | (1e-300,-1e-300) | ((2,0),(2,4),(0,0)) | t - | (1e-300,-1e-300) | ((3,1),(3,3),(1,0)) | f - | (1e-300,-1e-300) | ((1,2),(3,4),(5,6),(7,8)) | f - | (1e-300,-1e-300) | ((7,8),(5,6),(3,4),(1,2)) | f - | (1e-300,-1e-300) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (1e-300,-1e-300) | ((0,0)) | t - | (1e-300,-1e-300) | ((0,1),(0,1)) | f - | (1e+300,Infinity) | ((2,0),(2,4),(0,0)) | f - | (1e+300,Infinity) | ((3,1),(3,3),(1,0)) | f - | (1e+300,Infinity) | ((1,2),(3,4),(5,6),(7,8)) | f - | (1e+300,Infinity) | ((7,8),(5,6),(3,4),(1,2)) | f - | (1e+300,Infinity) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (1e+300,Infinity) | ((0,0)) | f - | (1e+300,Infinity) | ((0,1),(0,1)) | f - | (NaN,NaN) | ((2,0),(2,4),(0,0)) | t - | (NaN,NaN) | ((3,1),(3,3),(1,0)) | t - | (NaN,NaN) | ((1,2),(3,4),(5,6),(7,8)) | t - | (NaN,NaN) | ((7,8),(5,6),(3,4),(1,2)) | t - | (NaN,NaN) | ((1,2),(7,8),(5,6),(3,-4)) | t - | (NaN,NaN) | ((0,0)) | t - | (NaN,NaN) | ((0,1),(0,1)) | t - | (10,10) | ((2,0),(2,4),(0,0)) | f - | (10,10) | ((3,1),(3,3),(1,0)) | f - | (10,10) | ((1,2),(3,4),(5,6),(7,8)) | f - | (10,10) | ((7,8),(5,6),(3,4),(1,2)) | f - | (10,10) | ((1,2),(7,8),(5,6),(3,-4)) | f - | (10,10) | ((0,0)) | f - | (10,10) | ((0,1),(0,1)) | f -(63 rows) - -SELECT '' AS four, npoints(f1) AS npoints, f1 AS polygon - FROM POLYGON_TBL; - four | npoints | polygon -------+---------+---------------------------- - | 3 | ((2,0),(2,4),(0,0)) - | 3 | ((3,1),(3,3),(1,0)) - | 4 | ((1,2),(3,4),(5,6),(7,8)) - | 4 | ((7,8),(5,6),(3,4),(1,2)) - | 4 | ((1,2),(7,8),(5,6),(3,-4)) - | 1 | ((0,0)) - | 2 | ((0,1),(0,1)) -(7 rows) - -SELECT '' AS four, polygon(f1) - FROM BOX_TBL; - four | polygon -------+------------------------------------------- - | ((0,0),(0,2),(2,2),(2,0)) - | ((1,1),(1,3),(3,3),(3,1)) - | ((-8,-10),(-8,2),(-2,2),(-2,-10)) - | ((2.5,2.5),(2.5,3.5),(2.5,3.5),(2.5,2.5)) - | ((3,3),(3,3),(3,3),(3,3)) -(5 rows) - -SELECT '' AS four, polygon(f1) - FROM PATH_TBL WHERE isclosed(f1); - four | polygon -------+------------------- - | ((1,2),(3,4)) - | ((1,2),(3,4)) - | ((1,2),(3,4)) - | ((10,20)) - | ((11,12),(13,14)) -(5 rows) - -SELECT '' AS four, f1 AS open_path, polygon( pclose(f1)) AS polygon - FROM PATH_TBL - WHERE isopen(f1); - four | open_path | polygon -------+---------------------------+--------------------------- - | [(1,2),(3,4)] | ((1,2),(3,4)) - | [(0,0),(3,0),(4,5),(1,6)] | ((0,0),(3,0),(4,5),(1,6)) - | [(1,2),(3,4)] | ((1,2),(3,4)) - | [(11,12),(13,14)] | ((11,12),(13,14)) -(4 rows) - --- To box -SELECT f1, f1::box FROM POLYGON_TBL; - f1 | f1 -----------------------------+-------------- - ((2,0),(2,4),(0,0)) | (2,4),(0,0) - ((3,1),(3,3),(1,0)) | (3,3),(1,0) - ((1,2),(3,4),(5,6),(7,8)) | (7,8),(1,2) - ((7,8),(5,6),(3,4),(1,2)) | (7,8),(1,2) - ((1,2),(7,8),(5,6),(3,-4)) | (7,8),(1,-4) - ((0,0)) | (0,0),(0,0) - ((0,1),(0,1)) | (0,1),(0,1) -(7 rows) - --- To path -SELECT f1, f1::path FROM POLYGON_TBL; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(7 rows) - --- Same as polygon -SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 ~= p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(9 rows) - --- Contained by polygon -SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 <@ p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(7,8),(5,6),(3,-4)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((2,0),(2,4),(0,0)) - ((0,0)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(12 rows) - --- Contains polygon -SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 @> p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((2,0),(2,4),(0,0)) | ((0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(7,8),(5,6),(3,-4)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(12 rows) - --- Overlap with polygon -SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 && p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((2,0),(2,4),(0,0)) | ((3,1),(3,3),(1,0)) - ((2,0),(2,4),(0,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((2,0),(2,4),(0,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((2,0),(2,4),(0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((2,0),(2,4),(0,0)) | ((0,0)) - ((3,1),(3,3),(1,0)) | ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((3,1),(3,3),(1,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(3,4),(5,6),(7,8)) | ((2,0),(2,4),(0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(7,8),(5,6),(3,-4)) - ((7,8),(5,6),(3,4),(1,2)) | ((2,0),(2,4),(0,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(7,8),(5,6),(3,-4)) | ((2,0),(2,4),(0,0)) - ((1,2),(7,8),(5,6),(3,-4)) | ((3,1),(3,3),(1,0)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(7,8),(5,6),(3,-4)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((2,0),(2,4),(0,0)) - ((0,0)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(25 rows) - --- Left of polygon -SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 << p2.f1; - f1 | f1 ----------------+---------------------------- - ((0,0)) | ((3,1),(3,3),(1,0)) - ((0,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,1),(0,1)) | ((3,1),(3,3),(1,0)) - ((0,1),(0,1)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,1),(0,1)) | ((7,8),(5,6),(3,4),(1,2)) - ((0,1),(0,1)) | ((1,2),(7,8),(5,6),(3,-4)) -(8 rows) - --- Overlap of left of polygon -SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 &< p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((2,0),(2,4),(0,0)) | ((3,1),(3,3),(1,0)) - ((2,0),(2,4),(0,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((2,0),(2,4),(0,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((2,0),(2,4),(0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((3,1),(3,3),(1,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((3,1),(3,3),(1,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((3,1),(3,3),(1,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(7,8),(5,6),(3,-4)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(7,8),(5,6),(3,-4)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((2,0),(2,4),(0,0)) - ((0,0)) | ((3,1),(3,3),(1,0)) - ((0,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((0,0)) - ((0,0)) | ((0,1),(0,1)) - ((0,1),(0,1)) | ((2,0),(2,4),(0,0)) - ((0,1),(0,1)) | ((3,1),(3,3),(1,0)) - ((0,1),(0,1)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,1),(0,1)) | ((7,8),(5,6),(3,4),(1,2)) - ((0,1),(0,1)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,1),(0,1)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(32 rows) - --- Right of polygon -SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 >> p2.f1; - f1 | f1 -----------------------------+--------------- - ((3,1),(3,3),(1,0)) | ((0,0)) - ((3,1),(3,3),(1,0)) | ((0,1),(0,1)) - ((1,2),(3,4),(5,6),(7,8)) | ((0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((0,1),(0,1)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,1),(0,1)) - ((1,2),(7,8),(5,6),(3,-4)) | ((0,0)) - ((1,2),(7,8),(5,6),(3,-4)) | ((0,1),(0,1)) -(8 rows) - --- Overlap of right of polygon -SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 &> p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((2,0),(2,4),(0,0)) | ((0,0)) - ((2,0),(2,4),(0,0)) | ((0,1),(0,1)) - ((3,1),(3,3),(1,0)) | ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((3,1),(3,3),(1,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((3,1),(3,3),(1,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((3,1),(3,3),(1,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((3,1),(3,3),(1,0)) | ((0,0)) - ((3,1),(3,3),(1,0)) | ((0,1),(0,1)) - ((1,2),(3,4),(5,6),(7,8)) | ((2,0),(2,4),(0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((3,1),(3,3),(1,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(3,4),(5,6),(7,8)) | ((0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((0,1),(0,1)) - ((7,8),(5,6),(3,4),(1,2)) | ((2,0),(2,4),(0,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((3,1),(3,3),(1,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(7,8),(5,6),(3,-4)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,1),(0,1)) - ((1,2),(7,8),(5,6),(3,-4)) | ((2,0),(2,4),(0,0)) - ((1,2),(7,8),(5,6),(3,-4)) | ((3,1),(3,3),(1,0)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(7,8),(5,6),(3,-4)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(7,8),(5,6),(3,-4)) | ((0,0)) - ((1,2),(7,8),(5,6),(3,-4)) | ((0,1),(0,1)) - ((0,0)) | ((2,0),(2,4),(0,0)) - ((0,0)) | ((0,0)) - ((0,0)) | ((0,1),(0,1)) - ((0,1),(0,1)) | ((2,0),(2,4),(0,0)) - ((0,1),(0,1)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(37 rows) - --- Below polygon -SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 <<| p2.f1; - f1 | f1 ----------------+--------------------------- - ((0,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((0,0)) | ((0,1),(0,1)) - ((0,1),(0,1)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,1),(0,1)) | ((7,8),(5,6),(3,4),(1,2)) -(5 rows) - --- Overlap or below polygon -SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 &<| p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((2,0),(2,4),(0,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((2,0),(2,4),(0,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((2,0),(2,4),(0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((3,1),(3,3),(1,0)) | ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((3,1),(3,3),(1,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((3,1),(3,3),(1,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((3,1),(3,3),(1,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(7,8),(5,6),(3,-4)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(7,8),(5,6),(3,-4)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((2,0),(2,4),(0,0)) - ((0,0)) | ((3,1),(3,3),(1,0)) - ((0,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((0,0)) - ((0,0)) | ((0,1),(0,1)) - ((0,1),(0,1)) | ((2,0),(2,4),(0,0)) - ((0,1),(0,1)) | ((3,1),(3,3),(1,0)) - ((0,1),(0,1)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,1),(0,1)) | ((7,8),(5,6),(3,4),(1,2)) - ((0,1),(0,1)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(31 rows) - --- Above polygon -SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 |>> p2.f1; - f1 | f1 ----------------------------+--------------- - ((1,2),(3,4),(5,6),(7,8)) | ((0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((0,1),(0,1)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,1),(0,1)) - ((0,1),(0,1)) | ((0,0)) -(5 rows) - --- Overlap or above polygon -SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 |&> p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((2,0),(2,4),(0,0)) | ((3,1),(3,3),(1,0)) - ((2,0),(2,4),(0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((2,0),(2,4),(0,0)) | ((0,0)) - ((3,1),(3,3),(1,0)) | ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((3,1),(3,3),(1,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((3,1),(3,3),(1,0)) | ((0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((2,0),(2,4),(0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((3,1),(3,3),(1,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(3,4),(5,6),(7,8)) | ((0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((0,1),(0,1)) - ((7,8),(5,6),(3,4),(1,2)) | ((2,0),(2,4),(0,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((3,1),(3,3),(1,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(7,8),(5,6),(3,-4)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,1),(0,1)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((2,0),(2,4),(0,0)) - ((0,0)) | ((3,1),(3,3),(1,0)) - ((0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((0,0)) - ((0,1),(0,1)) | ((2,0),(2,4),(0,0)) - ((0,1),(0,1)) | ((3,1),(3,3),(1,0)) - ((0,1),(0,1)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,1),(0,1)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(32 rows) - --- Distance to polygon -SELECT p1.f1, p2.f1, p1.f1 <-> p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2; -ERROR: function "poly_distance" not implemented --- --- Circles --- -SELECT '' AS six, circle(f1, 50.0) - FROM POINT_TBL; - six | circle ------+------------------------ - | <(0,0),50> - | <(-10,0),50> - | <(-3,4),50> - | <(5.1,34.5),50> - | <(-5,-12),50> - | <(1e-300,-1e-300),50> - | <(1e+300,Infinity),50> - | <(NaN,NaN),50> - | <(10,10),50> -(9 rows) - -SELECT '' AS four, circle(f1) - FROM BOX_TBL; - four | circle -------+------------------------ - | <(1,1),1.41421356237> - | <(2,2),1.41421356237> - | <(-5,-4),6.7082039325> - | <(2.5,3),0.5> - | <(3,3),0> -(5 rows) - -SELECT '' AS two, circle(f1) - FROM POLYGON_TBL - WHERE (# f1) >= 3; - two | circle ------+----------------------------------------------- - | <(1.33333333333,1.33333333333),2.04168905064> - | <(2.33333333333,1.33333333333),1.47534300379> - | <(4,5),2.82842712475> - | <(4,5),2.82842712475> - | <(4,3),4.80664375676> -(5 rows) - -SELECT '' AS twentyfour, c1.f1 AS circle, p1.f1 AS point, (p1.f1 <-> c1.f1) AS distance - FROM CIRCLE_TBL c1, POINT_TBL p1 - WHERE (p1.f1 <-> c1.f1) > 0 - ORDER BY distance, area(c1.f1), p1.f1[0]; - twentyfour | circle | point | distance -------------+----------------+-------------------+--------------- - | <(1,2),3> | (-3,4) | 1.472135955 - | <(5,1),3> | (0,0) | 2.09901951359 - | <(5,1),3> | (1e-300,-1e-300) | 2.09901951359 - | <(5,1),3> | (-3,4) | 5.54400374532 - | <(3,5),0> | (0,0) | 5.83095189485 - | <(3,5),0> | (1e-300,-1e-300) | 5.83095189485 - | <(3,5),0> | (-3,4) | 6.0827625303 - | <(1,3),5> | (-10,0) | 6.40175425099 - | <(1,3),5> | (10,10) | 6.40175425099 - | <(5,1),3> | (10,10) | 7.29563014099 - | <(1,2),3> | (-10,0) | 8.1803398875 - | <(3,5),0> | (10,10) | 8.60232526704 - | <(1,2),3> | (10,10) | 9.04159457879 - | <(1,3),5> | (-5,-12) | 11.1554944214 - | <(5,1),3> | (-10,0) | 12.0332963784 - | <(1,2),3> | (-5,-12) | 12.2315462117 - | <(5,1),3> | (-5,-12) | 13.4012194669 - | <(3,5),0> | (-10,0) | 13.9283882772 - | <(3,5),0> | (-5,-12) | 18.7882942281 - | <(1,3),5> | (5.1,34.5) | 26.7657047773 - | <(3,5),0> | (5.1,34.5) | 29.5746513082 - | <(1,2),3> | (5.1,34.5) | 29.7575945393 - | <(5,1),3> | (5.1,34.5) | 30.5001492534 - | <(100,200),10> | (5.1,34.5) | 180.778038568 - | <(100,200),10> | (10,10) | 200.237960416 - | <(100,200),10> | (-3,4) | 211.415898255 - | <(100,200),10> | (0,0) | 213.60679775 - | <(100,200),10> | (1e-300,-1e-300) | 213.60679775 - | <(100,200),10> | (-10,0) | 218.25424421 - | <(100,200),10> | (-5,-12) | 226.577682802 - | <(3,5),0> | (1e+300,Infinity) | Infinity - | <(1,2),3> | (1e+300,Infinity) | Infinity - | <(5,1),3> | (1e+300,Infinity) | Infinity - | <(1,3),5> | (1e+300,Infinity) | Infinity - | <(100,200),10> | (1e+300,Infinity) | Infinity - | <(1,2),100> | (1e+300,Infinity) | Infinity - | <(100,1),115> | (1e+300,Infinity) | Infinity - | <(3,5),0> | (NaN,NaN) | NaN - | <(1,2),3> | (NaN,NaN) | NaN - | <(5,1),3> | (NaN,NaN) | NaN - | <(1,3),5> | (NaN,NaN) | NaN - | <(100,200),10> | (NaN,NaN) | NaN - | <(1,2),100> | (NaN,NaN) | NaN - | <(100,1),115> | (NaN,NaN) | NaN - | <(3,5),NaN> | (-10,0) | NaN - | <(3,5),NaN> | (-5,-12) | NaN - | <(3,5),NaN> | (-3,4) | NaN - | <(3,5),NaN> | (0,0) | NaN - | <(3,5),NaN> | (1e-300,-1e-300) | NaN - | <(3,5),NaN> | (5.1,34.5) | NaN - | <(3,5),NaN> | (10,10) | NaN - | <(3,5),NaN> | (1e+300,Infinity) | NaN - | <(3,5),NaN> | (NaN,NaN) | NaN -(53 rows) - --- To polygon -SELECT f1, f1::polygon FROM CIRCLE_TBL WHERE f1 >= '<(0,0),1>'; - f1 | f1 -----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - <(5,1),3> | ((2,1),(2.40192378865,2.5),(3.5,3.59807621135),(5,4),(6.5,3.59807621135),(7.59807621135,2.5),(8,1),(7.59807621135,-0.5),(6.5,-1.59807621135),(5,-2),(3.5,-1.59807621135),(2.40192378865,-0.5)) - <(1,2),100> | ((-99,2),(-85.6025403784,52),(-49,88.6025403784),(1,102),(51,88.6025403784),(87.6025403784,52),(101,2),(87.6025403784,-48),(51,-84.6025403784),(1,-98),(-49,-84.6025403784),(-85.6025403784,-48)) - <(1,3),5> | ((-4,3),(-3.33012701892,5.5),(-1.5,7.33012701892),(1,8),(3.5,7.33012701892),(5.33012701892,5.5),(6,3),(5.33012701892,0.5),(3.5,-1.33012701892),(1,-2),(-1.5,-1.33012701892),(-3.33012701892,0.5)) - <(1,2),3> | ((-2,2),(-1.59807621135,3.5),(-0.5,4.59807621135),(1,5),(2.5,4.59807621135),(3.59807621135,3.5),(4,2),(3.59807621135,0.5),(2.5,-0.598076211353),(1,-1),(-0.5,-0.598076211353),(-1.59807621135,0.5)) - <(100,200),10> | ((90,200),(91.3397459622,205),(95,208.660254038),(100,210),(105,208.660254038),(108.660254038,205),(110,200),(108.660254038,195),(105,191.339745962),(100,190),(95,191.339745962),(91.3397459622,195)) - <(100,1),115> | ((-15,1),(0.40707856479,58.5),(42.5,100.592921435),(100,116),(157.5,100.592921435),(199.592921435,58.5),(215,1),(199.592921435,-56.5),(157.5,-98.5929214352),(100,-114),(42.5,-98.5929214352),(0.40707856479,-56.5)) -(6 rows) - --- To polygon with less points -SELECT f1, polygon(8, f1) FROM CIRCLE_TBL WHERE f1 >= '<(0,0),1>'; - f1 | polygon -----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------ - <(5,1),3> | ((2,1),(2.87867965644,3.12132034356),(5,4),(7.12132034356,3.12132034356),(8,1),(7.12132034356,-1.12132034356),(5,-2),(2.87867965644,-1.12132034356)) - <(1,2),100> | ((-99,2),(-69.7106781187,72.7106781187),(1,102),(71.7106781187,72.7106781187),(101,2),(71.7106781187,-68.7106781187),(1,-98),(-69.7106781187,-68.7106781187)) - <(1,3),5> | ((-4,3),(-2.53553390593,6.53553390593),(1,8),(4.53553390593,6.53553390593),(6,3),(4.53553390593,-0.535533905933),(1,-2),(-2.53553390593,-0.535533905933)) - <(1,2),3> | ((-2,2),(-1.12132034356,4.12132034356),(1,5),(3.12132034356,4.12132034356),(4,2),(3.12132034356,-0.12132034356),(1,-1),(-1.12132034356,-0.12132034356)) - <(100,200),10> | ((90,200),(92.9289321881,207.071067812),(100,210),(107.071067812,207.071067812),(110,200),(107.071067812,192.928932188),(100,190),(92.9289321881,192.928932188)) - <(100,1),115> | ((-15,1),(18.6827201635,82.3172798365),(100,116),(181.317279836,82.3172798365),(215,1),(181.317279836,-80.3172798365),(100,-114),(18.6827201635,-80.3172798365)) -(6 rows) - --- Too less points error -SELECT f1, polygon(1, f1) FROM CIRCLE_TBL WHERE f1 >= '<(0,0),1>'; -ERROR: must request at least 2 points --- Zero radius error -SELECT f1, polygon(10, f1) FROM CIRCLE_TBL WHERE f1 < '<(0,0),1>'; -ERROR: cannot convert circle with radius zero to polygon --- Same as circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 ~= c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(1,2),100> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(100,200),10> | <(100,200),10> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(3,5),0> - <(3,5),NaN> | <(3,5),0> - <(3,5),NaN> | <(3,5),NaN> -(9 rows) - --- Overlap with circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 && c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(1,2),3> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(5,1),3> - <(1,2),100> | <(1,2),100> - <(1,2),100> | <(1,3),5> - <(1,2),100> | <(1,2),3> - <(1,2),100> | <(100,1),115> - <(1,2),100> | <(3,5),0> - <(1,3),5> | <(5,1),3> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(1,2),3> - <(1,3),5> | <(100,1),115> - <(1,3),5> | <(3,5),0> - <(1,2),3> | <(5,1),3> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(100,200),10> - <(100,1),115> | <(5,1),3> - <(100,1),115> | <(1,2),100> - <(100,1),115> | <(1,3),5> - <(100,1),115> | <(1,2),3> - <(100,1),115> | <(100,1),115> - <(100,1),115> | <(3,5),0> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(33 rows) - --- Overlap or left of circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 &< c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(1,2),100> - <(1,2),100> | <(100,200),10> - <(1,2),100> | <(100,1),115> - <(1,3),5> | <(5,1),3> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(100,200),10> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(5,1),3> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(100,200),10> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(100,200),10> - <(100,200),10> | <(100,1),115> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,200),10> - <(3,5),0> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(28 rows) - --- Left of circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 << c2.f1; - f1 | f1 ------------+---------------- - <(5,1),3> | <(100,200),10> - <(1,3),5> | <(100,200),10> - <(1,2),3> | <(100,200),10> - <(3,5),0> | <(100,200),10> -(4 rows) - --- Right of circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 >> c2.f1; - f1 | f1 -----------------+----------- - <(100,200),10> | <(5,1),3> - <(100,200),10> | <(1,3),5> - <(100,200),10> | <(1,2),3> - <(100,200),10> | <(3,5),0> -(4 rows) - --- Overlap or right of circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 &> c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(1,2),3> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(1,2),100> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(5,1),3> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(1,3),5> - <(100,200),10> | <(1,2),3> - <(100,200),10> | <(100,200),10> - <(100,200),10> | <(100,1),115> - <(100,200),10> | <(3,5),0> - <(100,1),115> | <(1,2),100> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(28 rows) - --- Contained by circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 <@ c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(1,2),100> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(100,200),10> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(17 rows) - --- Contain by circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 @> c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(1,2),100> | <(5,1),3> - <(1,2),100> | <(1,2),100> - <(1,2),100> | <(1,3),5> - <(1,2),100> | <(1,2),3> - <(1,2),100> | <(3,5),0> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(1,2),3> - <(1,3),5> | <(3,5),0> - <(1,2),3> | <(1,2),3> - <(100,200),10> | <(100,200),10> - <(100,1),115> | <(5,1),3> - <(100,1),115> | <(1,3),5> - <(100,1),115> | <(1,2),3> - <(100,1),115> | <(100,1),115> - <(100,1),115> | <(3,5),0> - <(3,5),0> | <(3,5),0> -(17 rows) - --- Below circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 <<| c2.f1; - f1 | f1 ----------------+---------------- - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(3,5),0> - <(1,2),100> | <(100,200),10> - <(1,3),5> | <(100,200),10> - <(1,2),3> | <(100,200),10> - <(100,1),115> | <(100,200),10> - <(3,5),0> | <(100,200),10> -(7 rows) - --- Above circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 |>> c2.f1; - f1 | f1 -----------------+--------------- - <(100,200),10> | <(5,1),3> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(1,3),5> - <(100,200),10> | <(1,2),3> - <(100,200),10> | <(100,1),115> - <(100,200),10> | <(3,5),0> - <(3,5),0> | <(5,1),3> -(7 rows) - --- Overlap or below circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 &<| c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(1,2),3> - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(100,1),115> - <(5,1),3> | <(3,5),0> - <(1,2),100> | <(1,2),100> - <(1,2),100> | <(100,200),10> - <(1,2),100> | <(100,1),115> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(100,200),10> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(100,200),10> - <(1,2),3> | <(100,1),115> - <(1,2),3> | <(3,5),0> - <(100,200),10> | <(100,200),10> - <(100,1),115> | <(100,200),10> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,200),10> - <(3,5),0> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(29 rows) - --- Overlap or above circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 |&> c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(1,2),100> - <(1,2),100> | <(100,1),115> - <(1,3),5> | <(5,1),3> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(5,1),3> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(5,1),3> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(1,3),5> - <(100,200),10> | <(1,2),3> - <(100,200),10> | <(100,200),10> - <(100,200),10> | <(100,1),115> - <(100,200),10> | <(3,5),0> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(29 rows) - --- Area equal with circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 = c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),3> - <(1,2),100> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,2),3> | <(5,1),3> - <(1,2),3> | <(1,2),3> - <(100,200),10> | <(100,200),10> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(9 rows) - --- Area not equal with circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 != c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(100,1),115> - <(5,1),3> | <(3,5),0> - <(1,2),100> | <(5,1),3> - <(1,2),100> | <(1,3),5> - <(1,2),100> | <(1,2),3> - <(1,2),100> | <(100,200),10> - <(1,2),100> | <(100,1),115> - <(1,2),100> | <(3,5),0> - <(1,3),5> | <(5,1),3> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,2),3> - <(1,3),5> | <(100,200),10> - <(1,3),5> | <(100,1),115> - <(1,3),5> | <(3,5),0> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(100,200),10> - <(1,2),3> | <(100,1),115> - <(1,2),3> | <(3,5),0> - <(100,200),10> | <(5,1),3> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(1,3),5> - <(100,200),10> | <(1,2),3> - <(100,200),10> | <(100,1),115> - <(100,200),10> | <(3,5),0> - <(100,1),115> | <(5,1),3> - <(100,1),115> | <(1,2),100> - <(100,1),115> | <(1,3),5> - <(100,1),115> | <(1,2),3> - <(100,1),115> | <(100,200),10> - <(100,1),115> | <(3,5),0> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,200),10> - <(3,5),0> | <(100,1),115> -(40 rows) - --- Area less than circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 < c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(100,1),115> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(100,200),10> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(100,200),10> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(100,1),115> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,200),10> - <(3,5),0> | <(100,1),115> -(20 rows) - --- Area greater than circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 > c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(3,5),0> - <(1,2),100> | <(5,1),3> - <(1,2),100> | <(1,3),5> - <(1,2),100> | <(1,2),3> - <(1,2),100> | <(100,200),10> - <(1,2),100> | <(3,5),0> - <(1,3),5> | <(5,1),3> - <(1,3),5> | <(1,2),3> - <(1,3),5> | <(3,5),0> - <(1,2),3> | <(3,5),0> - <(100,200),10> | <(5,1),3> - <(100,200),10> | <(1,3),5> - <(100,200),10> | <(1,2),3> - <(100,200),10> | <(3,5),0> - <(100,1),115> | <(5,1),3> - <(100,1),115> | <(1,2),100> - <(100,1),115> | <(1,3),5> - <(100,1),115> | <(1,2),3> - <(100,1),115> | <(100,200),10> - <(100,1),115> | <(3,5),0> -(20 rows) - --- Area less than or equal circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 <= c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(1,2),3> - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(1,2),100> - <(1,2),100> | <(100,1),115> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(100,200),10> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(5,1),3> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(100,200),10> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(100,200),10> - <(100,200),10> | <(100,1),115> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,200),10> - <(3,5),0> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(29 rows) - --- Area greater than or equal circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 >= c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),3> - <(5,1),3> | <(3,5),0> - <(1,2),100> | <(5,1),3> - <(1,2),100> | <(1,2),100> - <(1,2),100> | <(1,3),5> - <(1,2),100> | <(1,2),3> - <(1,2),100> | <(100,200),10> - <(1,2),100> | <(3,5),0> - <(1,3),5> | <(5,1),3> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(1,2),3> - <(1,3),5> | <(3,5),0> - <(1,2),3> | <(5,1),3> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(3,5),0> - <(100,200),10> | <(5,1),3> - <(100,200),10> | <(1,3),5> - <(100,200),10> | <(1,2),3> - <(100,200),10> | <(100,200),10> - <(100,200),10> | <(3,5),0> - <(100,1),115> | <(5,1),3> - <(100,1),115> | <(1,2),100> - <(100,1),115> | <(1,3),5> - <(100,1),115> | <(1,2),3> - <(100,1),115> | <(100,200),10> - <(100,1),115> | <(100,1),115> - <(100,1),115> | <(3,5),0> - <(3,5),0> | <(3,5),0> -(29 rows) - --- Area less than circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 < c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(100,1),115> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(100,200),10> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(100,200),10> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(100,1),115> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,200),10> - <(3,5),0> | <(100,1),115> -(20 rows) - --- Area greater than circle -SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 < c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(100,1),115> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(100,200),10> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(100,200),10> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(100,1),115> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,200),10> - <(3,5),0> | <(100,1),115> -(20 rows) - --- Add point -SELECT c.f1, p.f1, c.f1 + p.f1 FROM CIRCLE_TBL c, POINT_TBL p; - f1 | f1 | ?column? -----------------+-------------------+------------------------- - <(5,1),3> | (0,0) | <(5,1),3> - <(1,2),100> | (0,0) | <(1,2),100> - <(1,3),5> | (0,0) | <(1,3),5> - <(1,2),3> | (0,0) | <(1,2),3> - <(100,200),10> | (0,0) | <(100,200),10> - <(100,1),115> | (0,0) | <(100,1),115> - <(3,5),0> | (0,0) | <(3,5),0> - <(3,5),NaN> | (0,0) | <(3,5),NaN> - <(5,1),3> | (-10,0) | <(-5,1),3> - <(1,2),100> | (-10,0) | <(-9,2),100> - <(1,3),5> | (-10,0) | <(-9,3),5> - <(1,2),3> | (-10,0) | <(-9,2),3> - <(100,200),10> | (-10,0) | <(90,200),10> - <(100,1),115> | (-10,0) | <(90,1),115> - <(3,5),0> | (-10,0) | <(-7,5),0> - <(3,5),NaN> | (-10,0) | <(-7,5),NaN> - <(5,1),3> | (-3,4) | <(2,5),3> - <(1,2),100> | (-3,4) | <(-2,6),100> - <(1,3),5> | (-3,4) | <(-2,7),5> - <(1,2),3> | (-3,4) | <(-2,6),3> - <(100,200),10> | (-3,4) | <(97,204),10> - <(100,1),115> | (-3,4) | <(97,5),115> - <(3,5),0> | (-3,4) | <(0,9),0> - <(3,5),NaN> | (-3,4) | <(0,9),NaN> - <(5,1),3> | (5.1,34.5) | <(10.1,35.5),3> - <(1,2),100> | (5.1,34.5) | <(6.1,36.5),100> - <(1,3),5> | (5.1,34.5) | <(6.1,37.5),5> - <(1,2),3> | (5.1,34.5) | <(6.1,36.5),3> - <(100,200),10> | (5.1,34.5) | <(105.1,234.5),10> - <(100,1),115> | (5.1,34.5) | <(105.1,35.5),115> - <(3,5),0> | (5.1,34.5) | <(8.1,39.5),0> - <(3,5),NaN> | (5.1,34.5) | <(8.1,39.5),NaN> - <(5,1),3> | (-5,-12) | <(0,-11),3> - <(1,2),100> | (-5,-12) | <(-4,-10),100> - <(1,3),5> | (-5,-12) | <(-4,-9),5> - <(1,2),3> | (-5,-12) | <(-4,-10),3> - <(100,200),10> | (-5,-12) | <(95,188),10> - <(100,1),115> | (-5,-12) | <(95,-11),115> - <(3,5),0> | (-5,-12) | <(-2,-7),0> - <(3,5),NaN> | (-5,-12) | <(-2,-7),NaN> - <(5,1),3> | (1e-300,-1e-300) | <(5,1),3> - <(1,2),100> | (1e-300,-1e-300) | <(1,2),100> - <(1,3),5> | (1e-300,-1e-300) | <(1,3),5> - <(1,2),3> | (1e-300,-1e-300) | <(1,2),3> - <(100,200),10> | (1e-300,-1e-300) | <(100,200),10> - <(100,1),115> | (1e-300,-1e-300) | <(100,1),115> - <(3,5),0> | (1e-300,-1e-300) | <(3,5),0> - <(3,5),NaN> | (1e-300,-1e-300) | <(3,5),NaN> - <(5,1),3> | (1e+300,Infinity) | <(1e+300,Infinity),3> - <(1,2),100> | (1e+300,Infinity) | <(1e+300,Infinity),100> - <(1,3),5> | (1e+300,Infinity) | <(1e+300,Infinity),5> - <(1,2),3> | (1e+300,Infinity) | <(1e+300,Infinity),3> - <(100,200),10> | (1e+300,Infinity) | <(1e+300,Infinity),10> - <(100,1),115> | (1e+300,Infinity) | <(1e+300,Infinity),115> - <(3,5),0> | (1e+300,Infinity) | <(1e+300,Infinity),0> - <(3,5),NaN> | (1e+300,Infinity) | <(1e+300,Infinity),NaN> - <(5,1),3> | (NaN,NaN) | <(NaN,NaN),3> - <(1,2),100> | (NaN,NaN) | <(NaN,NaN),100> - <(1,3),5> | (NaN,NaN) | <(NaN,NaN),5> - <(1,2),3> | (NaN,NaN) | <(NaN,NaN),3> - <(100,200),10> | (NaN,NaN) | <(NaN,NaN),10> - <(100,1),115> | (NaN,NaN) | <(NaN,NaN),115> - <(3,5),0> | (NaN,NaN) | <(NaN,NaN),0> - <(3,5),NaN> | (NaN,NaN) | <(NaN,NaN),NaN> - <(5,1),3> | (10,10) | <(15,11),3> - <(1,2),100> | (10,10) | <(11,12),100> - <(1,3),5> | (10,10) | <(11,13),5> - <(1,2),3> | (10,10) | <(11,12),3> - <(100,200),10> | (10,10) | <(110,210),10> - <(100,1),115> | (10,10) | <(110,11),115> - <(3,5),0> | (10,10) | <(13,15),0> - <(3,5),NaN> | (10,10) | <(13,15),NaN> -(72 rows) - --- Subtract point -SELECT c.f1, p.f1, c.f1 - p.f1 FROM CIRCLE_TBL c, POINT_TBL p; - f1 | f1 | ?column? -----------------+-------------------+--------------------------- - <(5,1),3> | (0,0) | <(5,1),3> - <(1,2),100> | (0,0) | <(1,2),100> - <(1,3),5> | (0,0) | <(1,3),5> - <(1,2),3> | (0,0) | <(1,2),3> - <(100,200),10> | (0,0) | <(100,200),10> - <(100,1),115> | (0,0) | <(100,1),115> - <(3,5),0> | (0,0) | <(3,5),0> - <(3,5),NaN> | (0,0) | <(3,5),NaN> - <(5,1),3> | (-10,0) | <(15,1),3> - <(1,2),100> | (-10,0) | <(11,2),100> - <(1,3),5> | (-10,0) | <(11,3),5> - <(1,2),3> | (-10,0) | <(11,2),3> - <(100,200),10> | (-10,0) | <(110,200),10> - <(100,1),115> | (-10,0) | <(110,1),115> - <(3,5),0> | (-10,0) | <(13,5),0> - <(3,5),NaN> | (-10,0) | <(13,5),NaN> - <(5,1),3> | (-3,4) | <(8,-3),3> - <(1,2),100> | (-3,4) | <(4,-2),100> - <(1,3),5> | (-3,4) | <(4,-1),5> - <(1,2),3> | (-3,4) | <(4,-2),3> - <(100,200),10> | (-3,4) | <(103,196),10> - <(100,1),115> | (-3,4) | <(103,-3),115> - <(3,5),0> | (-3,4) | <(6,1),0> - <(3,5),NaN> | (-3,4) | <(6,1),NaN> - <(5,1),3> | (5.1,34.5) | <(-0.1,-33.5),3> - <(1,2),100> | (5.1,34.5) | <(-4.1,-32.5),100> - <(1,3),5> | (5.1,34.5) | <(-4.1,-31.5),5> - <(1,2),3> | (5.1,34.5) | <(-4.1,-32.5),3> - <(100,200),10> | (5.1,34.5) | <(94.9,165.5),10> - <(100,1),115> | (5.1,34.5) | <(94.9,-33.5),115> - <(3,5),0> | (5.1,34.5) | <(-2.1,-29.5),0> - <(3,5),NaN> | (5.1,34.5) | <(-2.1,-29.5),NaN> - <(5,1),3> | (-5,-12) | <(10,13),3> - <(1,2),100> | (-5,-12) | <(6,14),100> - <(1,3),5> | (-5,-12) | <(6,15),5> - <(1,2),3> | (-5,-12) | <(6,14),3> - <(100,200),10> | (-5,-12) | <(105,212),10> - <(100,1),115> | (-5,-12) | <(105,13),115> - <(3,5),0> | (-5,-12) | <(8,17),0> - <(3,5),NaN> | (-5,-12) | <(8,17),NaN> - <(5,1),3> | (1e-300,-1e-300) | <(5,1),3> - <(1,2),100> | (1e-300,-1e-300) | <(1,2),100> - <(1,3),5> | (1e-300,-1e-300) | <(1,3),5> - <(1,2),3> | (1e-300,-1e-300) | <(1,2),3> - <(100,200),10> | (1e-300,-1e-300) | <(100,200),10> - <(100,1),115> | (1e-300,-1e-300) | <(100,1),115> - <(3,5),0> | (1e-300,-1e-300) | <(3,5),0> - <(3,5),NaN> | (1e-300,-1e-300) | <(3,5),NaN> - <(5,1),3> | (1e+300,Infinity) | <(-1e+300,-Infinity),3> - <(1,2),100> | (1e+300,Infinity) | <(-1e+300,-Infinity),100> - <(1,3),5> | (1e+300,Infinity) | <(-1e+300,-Infinity),5> - <(1,2),3> | (1e+300,Infinity) | <(-1e+300,-Infinity),3> - <(100,200),10> | (1e+300,Infinity) | <(-1e+300,-Infinity),10> - <(100,1),115> | (1e+300,Infinity) | <(-1e+300,-Infinity),115> - <(3,5),0> | (1e+300,Infinity) | <(-1e+300,-Infinity),0> - <(3,5),NaN> | (1e+300,Infinity) | <(-1e+300,-Infinity),NaN> - <(5,1),3> | (NaN,NaN) | <(NaN,NaN),3> - <(1,2),100> | (NaN,NaN) | <(NaN,NaN),100> - <(1,3),5> | (NaN,NaN) | <(NaN,NaN),5> - <(1,2),3> | (NaN,NaN) | <(NaN,NaN),3> - <(100,200),10> | (NaN,NaN) | <(NaN,NaN),10> - <(100,1),115> | (NaN,NaN) | <(NaN,NaN),115> - <(3,5),0> | (NaN,NaN) | <(NaN,NaN),0> - <(3,5),NaN> | (NaN,NaN) | <(NaN,NaN),NaN> - <(5,1),3> | (10,10) | <(-5,-9),3> - <(1,2),100> | (10,10) | <(-9,-8),100> - <(1,3),5> | (10,10) | <(-9,-7),5> - <(1,2),3> | (10,10) | <(-9,-8),3> - <(100,200),10> | (10,10) | <(90,190),10> - <(100,1),115> | (10,10) | <(90,-9),115> - <(3,5),0> | (10,10) | <(-7,-5),0> - <(3,5),NaN> | (10,10) | <(-7,-5),NaN> -(72 rows) - --- Multiply with point -SELECT c.f1, p.f1, c.f1 * p.f1 FROM CIRCLE_TBL c, POINT_TBL p; - f1 | f1 | ?column? -----------------+-------------------+-------------------------------------------- - <(5,1),3> | (0,0) | <(0,0),0> - <(1,2),100> | (0,0) | <(0,0),0> - <(1,3),5> | (0,0) | <(0,0),0> - <(1,2),3> | (0,0) | <(0,0),0> - <(100,200),10> | (0,0) | <(0,0),0> - <(100,1),115> | (0,0) | <(0,0),0> - <(3,5),0> | (0,0) | <(0,0),0> - <(3,5),NaN> | (0,0) | <(0,0),NaN> - <(5,1),3> | (-10,0) | <(-50,-10),30> - <(1,2),100> | (-10,0) | <(-10,-20),1000> - <(1,3),5> | (-10,0) | <(-10,-30),50> - <(1,2),3> | (-10,0) | <(-10,-20),30> - <(100,200),10> | (-10,0) | <(-1000,-2000),100> - <(100,1),115> | (-10,0) | <(-1000,-10),1150> - <(3,5),0> | (-10,0) | <(-30,-50),0> - <(3,5),NaN> | (-10,0) | <(-30,-50),NaN> - <(5,1),3> | (-3,4) | <(-19,17),15> - <(1,2),100> | (-3,4) | <(-11,-2),500> - <(1,3),5> | (-3,4) | <(-15,-5),25> - <(1,2),3> | (-3,4) | <(-11,-2),15> - <(100,200),10> | (-3,4) | <(-1100,-200),50> - <(100,1),115> | (-3,4) | <(-304,397),575> - <(3,5),0> | (-3,4) | <(-29,-3),0> - <(3,5),NaN> | (-3,4) | <(-29,-3),NaN> - <(5,1),3> | (5.1,34.5) | <(-9,177.6),104.624758064> - <(1,2),100> | (5.1,34.5) | <(-63.9,44.7),3487.49193547> - <(1,3),5> | (5.1,34.5) | <(-98.4,49.8),174.374596774> - <(1,2),3> | (5.1,34.5) | <(-63.9,44.7),104.624758064> - <(100,200),10> | (5.1,34.5) | <(-6390,4470),348.749193547> - <(100,1),115> | (5.1,34.5) | <(475.5,3455.1),4010.6157258> - <(3,5),0> | (5.1,34.5) | <(-157.2,129),0> - <(3,5),NaN> | (5.1,34.5) | <(-157.2,129),NaN> - <(5,1),3> | (-5,-12) | <(-13,-65),39> - <(1,2),100> | (-5,-12) | <(19,-22),1300> - <(1,3),5> | (-5,-12) | <(31,-27),65> - <(1,2),3> | (-5,-12) | <(19,-22),39> - <(100,200),10> | (-5,-12) | <(1900,-2200),130> - <(100,1),115> | (-5,-12) | <(-488,-1205),1495> - <(3,5),0> | (-5,-12) | <(45,-61),0> - <(3,5),NaN> | (-5,-12) | <(45,-61),NaN> - <(5,1),3> | (1e-300,-1e-300) | <(6e-300,-4e-300),4.24264068712e-300> - <(1,2),100> | (1e-300,-1e-300) | <(3e-300,1e-300),1.41421356237e-298> - <(1,3),5> | (1e-300,-1e-300) | <(4e-300,2e-300),7.07106781187e-300> - <(1,2),3> | (1e-300,-1e-300) | <(3e-300,1e-300),4.24264068712e-300> - <(100,200),10> | (1e-300,-1e-300) | <(3e-298,1e-298),1.41421356237e-299> - <(100,1),115> | (1e-300,-1e-300) | <(1.01e-298,-9.9e-299),1.62634559673e-298> - <(3,5),0> | (1e-300,-1e-300) | <(8e-300,2e-300),0> - <(3,5),NaN> | (1e-300,-1e-300) | <(8e-300,2e-300),NaN> - <(5,1),3> | (1e+300,Infinity) | <(-Infinity,Infinity),Infinity> - <(1,2),100> | (1e+300,Infinity) | <(-Infinity,Infinity),Infinity> - <(1,3),5> | (1e+300,Infinity) | <(-Infinity,Infinity),Infinity> - <(1,2),3> | (1e+300,Infinity) | <(-Infinity,Infinity),Infinity> - <(100,200),10> | (1e+300,Infinity) | <(-Infinity,Infinity),Infinity> - <(100,1),115> | (1e+300,Infinity) | <(-Infinity,Infinity),Infinity> - <(3,5),0> | (1e+300,Infinity) | <(-Infinity,Infinity),NaN> - <(3,5),NaN> | (1e+300,Infinity) | <(-Infinity,Infinity),NaN> - <(5,1),3> | (NaN,NaN) | <(NaN,NaN),NaN> - <(1,2),100> | (NaN,NaN) | <(NaN,NaN),NaN> - <(1,3),5> | (NaN,NaN) | <(NaN,NaN),NaN> - <(1,2),3> | (NaN,NaN) | <(NaN,NaN),NaN> - <(100,200),10> | (NaN,NaN) | <(NaN,NaN),NaN> - <(100,1),115> | (NaN,NaN) | <(NaN,NaN),NaN> - <(3,5),0> | (NaN,NaN) | <(NaN,NaN),NaN> - <(3,5),NaN> | (NaN,NaN) | <(NaN,NaN),NaN> - <(5,1),3> | (10,10) | <(40,60),42.4264068712> - <(1,2),100> | (10,10) | <(-10,30),1414.21356237> - <(1,3),5> | (10,10) | <(-20,40),70.7106781187> - <(1,2),3> | (10,10) | <(-10,30),42.4264068712> - <(100,200),10> | (10,10) | <(-1000,3000),141.421356237> - <(100,1),115> | (10,10) | <(990,1010),1626.34559673> - <(3,5),0> | (10,10) | <(-20,80),0> - <(3,5),NaN> | (10,10) | <(-20,80),NaN> -(72 rows) - --- Divide by point -SELECT c.f1, p.f1, c.f1 / p.f1 FROM CIRCLE_TBL c, POINT_TBL p WHERE p.f1[0] BETWEEN 1 AND 1000; - f1 | f1 | ?column? -----------------+------------+------------------------------------------------------ - <(5,1),3> | (5.1,34.5) | <(0.0493315573973,-0.137635045138),0.0860217042937> - <(5,1),3> | (10,10) | <(0.3,-0.2),0.212132034356> - <(1,2),100> | (5.1,34.5) | <(0.0609244733856,-0.0199792807459),2.86739014312> - <(1,2),100> | (10,10) | <(0.15,0.05),7.07106781187> - <(1,3),5> | (5.1,34.5) | <(0.0892901188891,-0.0157860983671),0.143369507156> - <(1,3),5> | (10,10) | <(0.2,0.1),0.353553390593> - <(1,2),3> | (5.1,34.5) | <(0.0609244733856,-0.0199792807459),0.0860217042937> - <(1,2),3> | (10,10) | <(0.15,0.05),0.212132034356> - <(100,200),10> | (5.1,34.5) | <(6.09244733856,-1.99792807459),0.286739014312> - <(100,200),10> | (10,10) | <(15,5),0.707106781187> - <(100,1),115> | (5.1,34.5) | <(0.44768388338,-2.83237136796),3.29749866459> - <(100,1),115> | (10,10) | <(5.05,-4.95),8.13172798365> - <(3,5),0> | (5.1,34.5) | <(0.154407774653,-0.0641310246164),0> - <(3,5),0> | (10,10) | <(0.4,0.1),0> - <(3,5),NaN> | (5.1,34.5) | <(0.154407774653,-0.0641310246164),NaN> - <(3,5),NaN> | (10,10) | <(0.4,0.1),NaN> -(16 rows) - --- Overflow error -SELECT c.f1, p.f1, c.f1 / p.f1 FROM CIRCLE_TBL c, POINT_TBL p WHERE p.f1[0] > 1000; -ERROR: value out of range: overflow --- Division by 0 error -SELECT c.f1, p.f1, c.f1 / p.f1 FROM CIRCLE_TBL c, POINT_TBL p WHERE p.f1 ~= '(0,0)'::point; -ERROR: division by zero --- Distance to polygon -SELECT c.f1, p.f1, c.f1 <-> p.f1 FROM CIRCLE_TBL c, POLYGON_TBL p; - f1 | f1 | ?column? -----------------+----------------------------+---------------- - <(5,1),3> | ((2,0),(2,4),(0,0)) | 0 - <(5,1),3> | ((3,1),(3,3),(1,0)) | 0 - <(5,1),3> | ((1,2),(3,4),(5,6),(7,8)) | 0.535533905933 - <(5,1),3> | ((7,8),(5,6),(3,4),(1,2)) | 0.535533905933 - <(5,1),3> | ((1,2),(7,8),(5,6),(3,-4)) | 0 - <(5,1),3> | ((0,0)) | 2.09901951359 - <(5,1),3> | ((0,1),(0,1)) | 2 - <(1,2),100> | ((2,0),(2,4),(0,0)) | 0 - <(1,2),100> | ((3,1),(3,3),(1,0)) | 0 - <(1,2),100> | ((1,2),(3,4),(5,6),(7,8)) | 0 - <(1,2),100> | ((7,8),(5,6),(3,4),(1,2)) | 0 - <(1,2),100> | ((1,2),(7,8),(5,6),(3,-4)) | 0 - <(1,2),100> | ((0,0)) | 0 - <(1,2),100> | ((0,1),(0,1)) | 0 - <(1,3),5> | ((2,0),(2,4),(0,0)) | 0 - <(1,3),5> | ((3,1),(3,3),(1,0)) | 0 - <(1,3),5> | ((1,2),(3,4),(5,6),(7,8)) | 0 - <(1,3),5> | ((7,8),(5,6),(3,4),(1,2)) | 0 - <(1,3),5> | ((1,2),(7,8),(5,6),(3,-4)) | 0 - <(1,3),5> | ((0,0)) | 0 - <(1,3),5> | ((0,1),(0,1)) | 0 - <(1,2),3> | ((2,0),(2,4),(0,0)) | 0 - <(1,2),3> | ((3,1),(3,3),(1,0)) | 0 - <(1,2),3> | ((1,2),(3,4),(5,6),(7,8)) | 0 - <(1,2),3> | ((7,8),(5,6),(3,4),(1,2)) | 0 - <(1,2),3> | ((1,2),(7,8),(5,6),(3,-4)) | 0 - <(1,2),3> | ((0,0)) | 0 - <(1,2),3> | ((0,1),(0,1)) | 0 - <(100,200),10> | ((2,0),(2,4),(0,0)) | 209.134661795 - <(100,200),10> | ((3,1),(3,3),(1,0)) | 209.585974051 - <(100,200),10> | ((1,2),(3,4),(5,6),(7,8)) | 203.337760371 - <(100,200),10> | ((7,8),(5,6),(3,4),(1,2)) | 203.337760371 - <(100,200),10> | ((1,2),(7,8),(5,6),(3,-4)) | 203.337760371 - <(100,200),10> | ((0,0)) | 213.60679775 - <(100,200),10> | ((0,1),(0,1)) | 212.712819568 - <(100,1),115> | ((2,0),(2,4),(0,0)) | 0 - <(100,1),115> | ((3,1),(3,3),(1,0)) | 0 - <(100,1),115> | ((1,2),(3,4),(5,6),(7,8)) | 0 - <(100,1),115> | ((7,8),(5,6),(3,4),(1,2)) | 0 - <(100,1),115> | ((1,2),(7,8),(5,6),(3,-4)) | 0 - <(100,1),115> | ((0,0)) | 0 - <(100,1),115> | ((0,1),(0,1)) | 0 - <(3,5),0> | ((2,0),(2,4),(0,0)) | 1.41421356237 - <(3,5),0> | ((3,1),(3,3),(1,0)) | 2 - <(3,5),0> | ((1,2),(3,4),(5,6),(7,8)) | 0.707106781187 - <(3,5),0> | ((7,8),(5,6),(3,4),(1,2)) | 0.707106781187 - <(3,5),0> | ((1,2),(7,8),(5,6),(3,-4)) | 0.707106781187 - <(3,5),0> | ((0,0)) | 5.83095189485 - <(3,5),0> | ((0,1),(0,1)) | 5 - <(3,5),NaN> | ((2,0),(2,4),(0,0)) | NaN - <(3,5),NaN> | ((3,1),(3,3),(1,0)) | NaN - <(3,5),NaN> | ((1,2),(3,4),(5,6),(7,8)) | NaN - <(3,5),NaN> | ((7,8),(5,6),(3,4),(1,2)) | NaN - <(3,5),NaN> | ((1,2),(7,8),(5,6),(3,-4)) | NaN - <(3,5),NaN> | ((0,0)) | NaN - <(3,5),NaN> | ((0,1),(0,1)) | NaN -(56 rows) - diff --git a/src/test/regress/expected/int8-exp-three-digits.out b/src/test/regress/expected/int8-exp-three-digits.out deleted file mode 100644 index c6d6ede812..0000000000 --- a/src/test/regress/expected/int8-exp-three-digits.out +++ /dev/null @@ -1,888 +0,0 @@ --- --- INT8 --- Test int8 64-bit integers. --- -CREATE TABLE INT8_TBL(q1 int8, q2 int8); -INSERT INTO INT8_TBL VALUES(' 123 ',' 456'); -INSERT INTO INT8_TBL VALUES('123 ','4567890123456789'); -INSERT INTO INT8_TBL VALUES('4567890123456789','123'); -INSERT INTO INT8_TBL VALUES(+4567890123456789,'4567890123456789'); -INSERT INTO INT8_TBL VALUES('+4567890123456789','-4567890123456789'); --- bad inputs -INSERT INTO INT8_TBL(q1) VALUES (' '); -ERROR: invalid input syntax for type bigint: " " -LINE 1: INSERT INTO INT8_TBL(q1) VALUES (' '); - ^ -INSERT INTO INT8_TBL(q1) VALUES ('xxx'); -ERROR: invalid input syntax for type bigint: "xxx" -LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('xxx'); - ^ -INSERT INTO INT8_TBL(q1) VALUES ('3908203590239580293850293850329485'); -ERROR: value "3908203590239580293850293850329485" is out of range for type bigint -LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('39082035902395802938502938... - ^ -INSERT INTO INT8_TBL(q1) VALUES ('-1204982019841029840928340329840934'); -ERROR: value "-1204982019841029840928340329840934" is out of range for type bigint -LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('-1204982019841029840928340... - ^ -INSERT INTO INT8_TBL(q1) VALUES ('- 123'); -ERROR: invalid input syntax for type bigint: "- 123" -LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('- 123'); - ^ -INSERT INTO INT8_TBL(q1) VALUES (' 345 5'); -ERROR: invalid input syntax for type bigint: " 345 5" -LINE 1: INSERT INTO INT8_TBL(q1) VALUES (' 345 5'); - ^ -INSERT INTO INT8_TBL(q1) VALUES (''); -ERROR: invalid input syntax for type bigint: "" -LINE 1: INSERT INTO INT8_TBL(q1) VALUES (''); - ^ -SELECT * FROM INT8_TBL; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - --- int8/int8 cmp -SELECT * FROM INT8_TBL WHERE q2 = 4567890123456789; - q1 | q2 -------------------+------------------ - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(2 rows) - -SELECT * FROM INT8_TBL WHERE q2 <> 4567890123456789; - q1 | q2 -------------------+------------------- - 123 | 456 - 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE q2 < 4567890123456789; - q1 | q2 -------------------+------------------- - 123 | 456 - 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE q2 > 4567890123456789; - q1 | q2 -----+---- -(0 rows) - -SELECT * FROM INT8_TBL WHERE q2 <= 4567890123456789; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - -SELECT * FROM INT8_TBL WHERE q2 >= 4567890123456789; - q1 | q2 -------------------+------------------ - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(2 rows) - --- int8/int4 cmp -SELECT * FROM INT8_TBL WHERE q2 = 456; - q1 | q2 ------+----- - 123 | 456 -(1 row) - -SELECT * FROM INT8_TBL WHERE q2 <> 456; - q1 | q2 -------------------+------------------- - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(4 rows) - -SELECT * FROM INT8_TBL WHERE q2 < 456; - q1 | q2 -------------------+------------------- - 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 -(2 rows) - -SELECT * FROM INT8_TBL WHERE q2 > 456; - q1 | q2 -------------------+------------------ - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(2 rows) - -SELECT * FROM INT8_TBL WHERE q2 <= 456; - q1 | q2 -------------------+------------------- - 123 | 456 - 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE q2 >= 456; - q1 | q2 -------------------+------------------ - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(3 rows) - --- int4/int8 cmp -SELECT * FROM INT8_TBL WHERE 123 = q1; - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - -SELECT * FROM INT8_TBL WHERE 123 <> q1; - q1 | q2 -------------------+------------------- - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE 123 < q1; - q1 | q2 -------------------+------------------- - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE 123 > q1; - q1 | q2 -----+---- -(0 rows) - -SELECT * FROM INT8_TBL WHERE 123 <= q1; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - -SELECT * FROM INT8_TBL WHERE 123 >= q1; - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - --- int8/int2 cmp -SELECT * FROM INT8_TBL WHERE q2 = '456'::int2; - q1 | q2 ------+----- - 123 | 456 -(1 row) - -SELECT * FROM INT8_TBL WHERE q2 <> '456'::int2; - q1 | q2 -------------------+------------------- - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(4 rows) - -SELECT * FROM INT8_TBL WHERE q2 < '456'::int2; - q1 | q2 -------------------+------------------- - 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 -(2 rows) - -SELECT * FROM INT8_TBL WHERE q2 > '456'::int2; - q1 | q2 -------------------+------------------ - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(2 rows) - -SELECT * FROM INT8_TBL WHERE q2 <= '456'::int2; - q1 | q2 -------------------+------------------- - 123 | 456 - 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE q2 >= '456'::int2; - q1 | q2 -------------------+------------------ - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(3 rows) - --- int2/int8 cmp -SELECT * FROM INT8_TBL WHERE '123'::int2 = q1; - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - -SELECT * FROM INT8_TBL WHERE '123'::int2 <> q1; - q1 | q2 -------------------+------------------- - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE '123'::int2 < q1; - q1 | q2 -------------------+------------------- - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE '123'::int2 > q1; - q1 | q2 -----+---- -(0 rows) - -SELECT * FROM INT8_TBL WHERE '123'::int2 <= q1; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - -SELECT * FROM INT8_TBL WHERE '123'::int2 >= q1; - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - -SELECT '' AS five, q1 AS plus, -q1 AS minus FROM INT8_TBL; - five | plus | minus -------+------------------+------------------- - | 123 | -123 - | 123 | -123 - | 4567890123456789 | -4567890123456789 - | 4567890123456789 | -4567890123456789 - | 4567890123456789 | -4567890123456789 -(5 rows) - -SELECT '' AS five, q1, q2, q1 + q2 AS plus FROM INT8_TBL; - five | q1 | q2 | plus -------+------------------+-------------------+------------------ - | 123 | 456 | 579 - | 123 | 4567890123456789 | 4567890123456912 - | 4567890123456789 | 123 | 4567890123456912 - | 4567890123456789 | 4567890123456789 | 9135780246913578 - | 4567890123456789 | -4567890123456789 | 0 -(5 rows) - -SELECT '' AS five, q1, q2, q1 - q2 AS minus FROM INT8_TBL; - five | q1 | q2 | minus -------+------------------+-------------------+------------------- - | 123 | 456 | -333 - | 123 | 4567890123456789 | -4567890123456666 - | 4567890123456789 | 123 | 4567890123456666 - | 4567890123456789 | 4567890123456789 | 0 - | 4567890123456789 | -4567890123456789 | 9135780246913578 -(5 rows) - -SELECT '' AS three, q1, q2, q1 * q2 AS multiply FROM INT8_TBL; -ERROR: bigint out of range -SELECT '' AS three, q1, q2, q1 * q2 AS multiply FROM INT8_TBL - WHERE q1 < 1000 or (q2 > 0 and q2 < 1000); - three | q1 | q2 | multiply --------+------------------+------------------+-------------------- - | 123 | 456 | 56088 - | 123 | 4567890123456789 | 561850485185185047 - | 4567890123456789 | 123 | 561850485185185047 -(3 rows) - -SELECT '' AS five, q1, q2, q1 / q2 AS divide, q1 % q2 AS mod FROM INT8_TBL; - five | q1 | q2 | divide | mod -------+------------------+-------------------+----------------+----- - | 123 | 456 | 0 | 123 - | 123 | 4567890123456789 | 0 | 123 - | 4567890123456789 | 123 | 37137318076884 | 57 - | 4567890123456789 | 4567890123456789 | 1 | 0 - | 4567890123456789 | -4567890123456789 | -1 | 0 -(5 rows) - -SELECT '' AS five, q1, float8(q1) FROM INT8_TBL; - five | q1 | float8 -------+------------------+----------------------- - | 123 | 123 - | 123 | 123 - | 4567890123456789 | 4.56789012345679e+015 - | 4567890123456789 | 4.56789012345679e+015 - | 4567890123456789 | 4.56789012345679e+015 -(5 rows) - -SELECT '' AS five, q2, float8(q2) FROM INT8_TBL; - five | q2 | float8 -------+-------------------+------------------------ - | 456 | 456 - | 4567890123456789 | 4.56789012345679e+015 - | 123 | 123 - | 4567890123456789 | 4.56789012345679e+015 - | -4567890123456789 | -4.56789012345679e+015 -(5 rows) - -SELECT 37 + q1 AS plus4 FROM INT8_TBL; - plus4 ------------------- - 160 - 160 - 4567890123456826 - 4567890123456826 - 4567890123456826 -(5 rows) - -SELECT 37 - q1 AS minus4 FROM INT8_TBL; - minus4 -------------------- - -86 - -86 - -4567890123456752 - -4567890123456752 - -4567890123456752 -(5 rows) - -SELECT '' AS five, 2 * q1 AS "twice int4" FROM INT8_TBL; - five | twice int4 -------+------------------ - | 246 - | 246 - | 9135780246913578 - | 9135780246913578 - | 9135780246913578 -(5 rows) - -SELECT '' AS five, q1 * 2 AS "twice int4" FROM INT8_TBL; - five | twice int4 -------+------------------ - | 246 - | 246 - | 9135780246913578 - | 9135780246913578 - | 9135780246913578 -(5 rows) - --- int8 op int4 -SELECT q1 + 42::int4 AS "8plus4", q1 - 42::int4 AS "8minus4", q1 * 42::int4 AS "8mul4", q1 / 42::int4 AS "8div4" FROM INT8_TBL; - 8plus4 | 8minus4 | 8mul4 | 8div4 -------------------+------------------+--------------------+----------------- - 165 | 81 | 5166 | 2 - 165 | 81 | 5166 | 2 - 4567890123456831 | 4567890123456747 | 191851385185185138 | 108759288653733 - 4567890123456831 | 4567890123456747 | 191851385185185138 | 108759288653733 - 4567890123456831 | 4567890123456747 | 191851385185185138 | 108759288653733 -(5 rows) - --- int4 op int8 -SELECT 246::int4 + q1 AS "4plus8", 246::int4 - q1 AS "4minus8", 246::int4 * q1 AS "4mul8", 246::int4 / q1 AS "4div8" FROM INT8_TBL; - 4plus8 | 4minus8 | 4mul8 | 4div8 -------------------+-------------------+---------------------+------- - 369 | 123 | 30258 | 2 - 369 | 123 | 30258 | 2 - 4567890123457035 | -4567890123456543 | 1123700970370370094 | 0 - 4567890123457035 | -4567890123456543 | 1123700970370370094 | 0 - 4567890123457035 | -4567890123456543 | 1123700970370370094 | 0 -(5 rows) - --- int8 op int2 -SELECT q1 + 42::int2 AS "8plus2", q1 - 42::int2 AS "8minus2", q1 * 42::int2 AS "8mul2", q1 / 42::int2 AS "8div2" FROM INT8_TBL; - 8plus2 | 8minus2 | 8mul2 | 8div2 -------------------+------------------+--------------------+----------------- - 165 | 81 | 5166 | 2 - 165 | 81 | 5166 | 2 - 4567890123456831 | 4567890123456747 | 191851385185185138 | 108759288653733 - 4567890123456831 | 4567890123456747 | 191851385185185138 | 108759288653733 - 4567890123456831 | 4567890123456747 | 191851385185185138 | 108759288653733 -(5 rows) - --- int2 op int8 -SELECT 246::int2 + q1 AS "2plus8", 246::int2 - q1 AS "2minus8", 246::int2 * q1 AS "2mul8", 246::int2 / q1 AS "2div8" FROM INT8_TBL; - 2plus8 | 2minus8 | 2mul8 | 2div8 -------------------+-------------------+---------------------+------- - 369 | 123 | 30258 | 2 - 369 | 123 | 30258 | 2 - 4567890123457035 | -4567890123456543 | 1123700970370370094 | 0 - 4567890123457035 | -4567890123456543 | 1123700970370370094 | 0 - 4567890123457035 | -4567890123456543 | 1123700970370370094 | 0 -(5 rows) - -SELECT q2, abs(q2) FROM INT8_TBL; - q2 | abs --------------------+------------------ - 456 | 456 - 4567890123456789 | 4567890123456789 - 123 | 123 - 4567890123456789 | 4567890123456789 - -4567890123456789 | 4567890123456789 -(5 rows) - -SELECT min(q1), min(q2) FROM INT8_TBL; - min | min ------+------------------- - 123 | -4567890123456789 -(1 row) - -SELECT max(q1), max(q2) FROM INT8_TBL; - max | max -------------------+------------------ - 4567890123456789 | 4567890123456789 -(1 row) - --- TO_CHAR() --- -SELECT '' AS to_char_1, to_char(q1, '9G999G999G999G999G999'), to_char(q2, '9,999,999,999,999,999') - FROM INT8_TBL; - to_char_1 | to_char | to_char ------------+------------------------+------------------------ - | 123 | 456 - | 123 | 4,567,890,123,456,789 - | 4,567,890,123,456,789 | 123 - | 4,567,890,123,456,789 | 4,567,890,123,456,789 - | 4,567,890,123,456,789 | -4,567,890,123,456,789 -(5 rows) - -SELECT '' AS to_char_2, to_char(q1, '9G999G999G999G999G999D999G999'), to_char(q2, '9,999,999,999,999,999.999,999') - FROM INT8_TBL; - to_char_2 | to_char | to_char ------------+--------------------------------+-------------------------------- - | 123.000,000 | 456.000,000 - | 123.000,000 | 4,567,890,123,456,789.000,000 - | 4,567,890,123,456,789.000,000 | 123.000,000 - | 4,567,890,123,456,789.000,000 | 4,567,890,123,456,789.000,000 - | 4,567,890,123,456,789.000,000 | -4,567,890,123,456,789.000,000 -(5 rows) - -SELECT '' AS to_char_3, to_char( (q1 * -1), '9999999999999999PR'), to_char( (q2 * -1), '9999999999999999.999PR') - FROM INT8_TBL; - to_char_3 | to_char | to_char ------------+--------------------+------------------------ - | <123> | <456.000> - | <123> | <4567890123456789.000> - | <4567890123456789> | <123.000> - | <4567890123456789> | <4567890123456789.000> - | <4567890123456789> | 4567890123456789.000 -(5 rows) - -SELECT '' AS to_char_4, to_char( (q1 * -1), '9999999999999999S'), to_char( (q2 * -1), 'S9999999999999999') - FROM INT8_TBL; - to_char_4 | to_char | to_char ------------+-------------------+------------------- - | 123- | -456 - | 123- | -4567890123456789 - | 4567890123456789- | -123 - | 4567890123456789- | -4567890123456789 - | 4567890123456789- | +4567890123456789 -(5 rows) - -SELECT '' AS to_char_5, to_char(q2, 'MI9999999999999999') FROM INT8_TBL; - to_char_5 | to_char ------------+------------------- - | 456 - | 4567890123456789 - | 123 - | 4567890123456789 - | -4567890123456789 -(5 rows) - -SELECT '' AS to_char_6, to_char(q2, 'FMS9999999999999999') FROM INT8_TBL; - to_char_6 | to_char ------------+------------------- - | +456 - | +4567890123456789 - | +123 - | +4567890123456789 - | -4567890123456789 -(5 rows) - -SELECT '' AS to_char_7, to_char(q2, 'FM9999999999999999THPR') FROM INT8_TBL; - to_char_7 | to_char ------------+-------------------- - | 456TH - | 4567890123456789TH - | 123RD - | 4567890123456789TH - | <4567890123456789> -(5 rows) - -SELECT '' AS to_char_8, to_char(q2, 'SG9999999999999999th') FROM INT8_TBL; - to_char_8 | to_char ------------+--------------------- - | + 456th - | +4567890123456789th - | + 123rd - | +4567890123456789th - | -4567890123456789 -(5 rows) - -SELECT '' AS to_char_9, to_char(q2, '0999999999999999') FROM INT8_TBL; - to_char_9 | to_char ------------+------------------- - | 0000000000000456 - | 4567890123456789 - | 0000000000000123 - | 4567890123456789 - | -4567890123456789 -(5 rows) - -SELECT '' AS to_char_10, to_char(q2, 'S0999999999999999') FROM INT8_TBL; - to_char_10 | to_char -------------+------------------- - | +0000000000000456 - | +4567890123456789 - | +0000000000000123 - | +4567890123456789 - | -4567890123456789 -(5 rows) - -SELECT '' AS to_char_11, to_char(q2, 'FM0999999999999999') FROM INT8_TBL; - to_char_11 | to_char -------------+------------------- - | 0000000000000456 - | 4567890123456789 - | 0000000000000123 - | 4567890123456789 - | -4567890123456789 -(5 rows) - -SELECT '' AS to_char_12, to_char(q2, 'FM9999999999999999.000') FROM INT8_TBL; - to_char_12 | to_char -------------+----------------------- - | 456.000 - | 4567890123456789.000 - | 123.000 - | 4567890123456789.000 - | -4567890123456789.000 -(5 rows) - -SELECT '' AS to_char_13, to_char(q2, 'L9999999999999999.000') FROM INT8_TBL; - to_char_13 | to_char -------------+------------------------ - | 456.000 - | 4567890123456789.000 - | 123.000 - | 4567890123456789.000 - | -4567890123456789.000 -(5 rows) - -SELECT '' AS to_char_14, to_char(q2, 'FM9999999999999999.999') FROM INT8_TBL; - to_char_14 | to_char -------------+-------------------- - | 456. - | 4567890123456789. - | 123. - | 4567890123456789. - | -4567890123456789. -(5 rows) - -SELECT '' AS to_char_15, to_char(q2, 'S 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 . 9 9 9') FROM INT8_TBL; - to_char_15 | to_char -------------+------------------------------------------- - | +4 5 6 . 0 0 0 - | +4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 . 0 0 0 - | +1 2 3 . 0 0 0 - | +4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 . 0 0 0 - | -4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 . 0 0 0 -(5 rows) - -SELECT '' AS to_char_16, to_char(q2, E'99999 "text" 9999 "9999" 999 "\\"text between quote marks\\"" 9999') FROM INT8_TBL; - to_char_16 | to_char -------------+----------------------------------------------------------- - | text 9999 "text between quote marks" 456 - | 45678 text 9012 9999 345 "text between quote marks" 6789 - | text 9999 "text between quote marks" 123 - | 45678 text 9012 9999 345 "text between quote marks" 6789 - | -45678 text 9012 9999 345 "text between quote marks" 6789 -(5 rows) - -SELECT '' AS to_char_17, to_char(q2, '999999SG9999999999') FROM INT8_TBL; - to_char_17 | to_char -------------+------------------- - | + 456 - | 456789+0123456789 - | + 123 - | 456789+0123456789 - | 456789-0123456789 -(5 rows) - --- check min/max values and overflow behavior -select '-9223372036854775808'::int8; - int8 ----------------------- - -9223372036854775808 -(1 row) - -select '-9223372036854775809'::int8; -ERROR: value "-9223372036854775809" is out of range for type bigint -LINE 1: select '-9223372036854775809'::int8; - ^ -select '9223372036854775807'::int8; - int8 ---------------------- - 9223372036854775807 -(1 row) - -select '9223372036854775808'::int8; -ERROR: value "9223372036854775808" is out of range for type bigint -LINE 1: select '9223372036854775808'::int8; - ^ -select -('-9223372036854775807'::int8); - ?column? ---------------------- - 9223372036854775807 -(1 row) - -select -('-9223372036854775808'::int8); -ERROR: bigint out of range -select '9223372036854775800'::int8 + '9223372036854775800'::int8; -ERROR: bigint out of range -select '-9223372036854775800'::int8 + '-9223372036854775800'::int8; -ERROR: bigint out of range -select '9223372036854775800'::int8 - '-9223372036854775800'::int8; -ERROR: bigint out of range -select '-9223372036854775800'::int8 - '9223372036854775800'::int8; -ERROR: bigint out of range -select '9223372036854775800'::int8 * '9223372036854775800'::int8; -ERROR: bigint out of range -select '9223372036854775800'::int8 / '0'::int8; -ERROR: division by zero -select '9223372036854775800'::int8 % '0'::int8; -ERROR: division by zero -select abs('-9223372036854775808'::int8); -ERROR: bigint out of range -select '9223372036854775800'::int8 + '100'::int4; -ERROR: bigint out of range -select '-9223372036854775800'::int8 - '100'::int4; -ERROR: bigint out of range -select '9223372036854775800'::int8 * '100'::int4; -ERROR: bigint out of range -select '100'::int4 + '9223372036854775800'::int8; -ERROR: bigint out of range -select '-100'::int4 - '9223372036854775800'::int8; -ERROR: bigint out of range -select '100'::int4 * '9223372036854775800'::int8; -ERROR: bigint out of range -select '9223372036854775800'::int8 + '100'::int2; -ERROR: bigint out of range -select '-9223372036854775800'::int8 - '100'::int2; -ERROR: bigint out of range -select '9223372036854775800'::int8 * '100'::int2; -ERROR: bigint out of range -select '-9223372036854775808'::int8 / '0'::int2; -ERROR: division by zero -select '100'::int2 + '9223372036854775800'::int8; -ERROR: bigint out of range -select '-100'::int2 - '9223372036854775800'::int8; -ERROR: bigint out of range -select '100'::int2 * '9223372036854775800'::int8; -ERROR: bigint out of range -select '100'::int2 / '0'::int8; -ERROR: division by zero -SELECT CAST(q1 AS int4) FROM int8_tbl WHERE q2 = 456; - q1 ------ - 123 -(1 row) - -SELECT CAST(q1 AS int4) FROM int8_tbl WHERE q2 <> 456; -ERROR: integer out of range -SELECT CAST(q1 AS int2) FROM int8_tbl WHERE q2 = 456; - q1 ------ - 123 -(1 row) - -SELECT CAST(q1 AS int2) FROM int8_tbl WHERE q2 <> 456; -ERROR: smallint out of range -SELECT CAST('42'::int2 AS int8), CAST('-37'::int2 AS int8); - int8 | int8 -------+------ - 42 | -37 -(1 row) - -SELECT CAST(q1 AS float4), CAST(q2 AS float8) FROM INT8_TBL; - q1 | q2 ---------------+------------------------ - 123 | 456 - 123 | 4.56789012345679e+015 - 4.56789e+015 | 123 - 4.56789e+015 | 4.56789012345679e+015 - 4.56789e+015 | -4.56789012345679e+015 -(5 rows) - -SELECT CAST('36854775807.0'::float4 AS int8); - int8 -------------- - 36854775808 -(1 row) - -SELECT CAST('922337203685477580700.0'::float8 AS int8); -ERROR: bigint out of range -SELECT CAST(q1 AS oid) FROM INT8_TBL; -ERROR: OID out of range -SELECT oid::int8 FROM pg_class WHERE relname = 'pg_class'; - oid ------- - 1259 -(1 row) - --- bit operations -SELECT q1, q2, q1 & q2 AS "and", q1 | q2 AS "or", q1 # q2 AS "xor", ~q1 AS "not" FROM INT8_TBL; - q1 | q2 | and | or | xor | not -------------------+-------------------+------------------+------------------+------------------+------------------- - 123 | 456 | 72 | 507 | 435 | -124 - 123 | 4567890123456789 | 17 | 4567890123456895 | 4567890123456878 | -124 - 4567890123456789 | 123 | 17 | 4567890123456895 | 4567890123456878 | -4567890123456790 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 0 | -4567890123456790 - 4567890123456789 | -4567890123456789 | 1 | -1 | -2 | -4567890123456790 -(5 rows) - -SELECT q1, q1 << 2 AS "shl", q1 >> 3 AS "shr" FROM INT8_TBL; - q1 | shl | shr -------------------+-------------------+----------------- - 123 | 492 | 15 - 123 | 492 | 15 - 4567890123456789 | 18271560493827156 | 570986265432098 - 4567890123456789 | 18271560493827156 | 570986265432098 - 4567890123456789 | 18271560493827156 | 570986265432098 -(5 rows) - --- generate_series -SELECT * FROM generate_series('+4567890123456789'::int8, '+4567890123456799'::int8); - generate_series ------------------- - 4567890123456789 - 4567890123456790 - 4567890123456791 - 4567890123456792 - 4567890123456793 - 4567890123456794 - 4567890123456795 - 4567890123456796 - 4567890123456797 - 4567890123456798 - 4567890123456799 -(11 rows) - -SELECT * FROM generate_series('+4567890123456789'::int8, '+4567890123456799'::int8, 0); -ERROR: step size cannot equal zero -SELECT * FROM generate_series('+4567890123456789'::int8, '+4567890123456799'::int8, 2); - generate_series ------------------- - 4567890123456789 - 4567890123456791 - 4567890123456793 - 4567890123456795 - 4567890123456797 - 4567890123456799 -(6 rows) - --- corner case -SELECT (-1::int8<<63)::text; - text ----------------------- - -9223372036854775808 -(1 row) - -SELECT ((-1::int8<<63)+1)::text; - text ----------------------- - -9223372036854775807 -(1 row) - --- check sane handling of INT64_MIN overflow cases -SELECT (-9223372036854775808)::int8 * (-1)::int8; -ERROR: bigint out of range -SELECT (-9223372036854775808)::int8 / (-1)::int8; -ERROR: bigint out of range -SELECT (-9223372036854775808)::int8 % (-1)::int8; - ?column? ----------- - 0 -(1 row) - -SELECT (-9223372036854775808)::int8 * (-1)::int4; -ERROR: bigint out of range -SELECT (-9223372036854775808)::int8 / (-1)::int4; -ERROR: bigint out of range -SELECT (-9223372036854775808)::int8 % (-1)::int4; - ?column? ----------- - 0 -(1 row) - -SELECT (-9223372036854775808)::int8 * (-1)::int2; -ERROR: bigint out of range -SELECT (-9223372036854775808)::int8 / (-1)::int2; -ERROR: bigint out of range -SELECT (-9223372036854775808)::int8 % (-1)::int2; - ?column? ----------- - 0 -(1 row) - --- check rounding when casting from float -SELECT x, x::int8 AS int8_value -FROM (VALUES (-2.5::float8), - (-1.5::float8), - (-0.5::float8), - (0.0::float8), - (0.5::float8), - (1.5::float8), - (2.5::float8)) t(x); - x | int8_value -------+------------ - -2.5 | -2 - -1.5 | -2 - -0.5 | 0 - 0 | 0 - 0.5 | 0 - 1.5 | 2 - 2.5 | 2 -(7 rows) - --- check rounding when casting from numeric -SELECT x, x::int8 AS int8_value -FROM (VALUES (-2.5::numeric), - (-1.5::numeric), - (-0.5::numeric), - (0.0::numeric), - (0.5::numeric), - (1.5::numeric), - (2.5::numeric)) t(x); - x | int8_value -------+------------ - -2.5 | -3 - -1.5 | -2 - -0.5 | -1 - 0.0 | 0 - 0.5 | 1 - 1.5 | 2 - 2.5 | 3 -(7 rows) - diff --git a/src/test/regress/resultmap b/src/test/regress/resultmap index 04ba99fe33..46ca5639c2 100644 --- a/src/test/regress/resultmap +++ b/src/test/regress/resultmap @@ -1,17 +1,5 @@ -float4:out:i.86-pc-mingw32=float4-exp-three-digits.out -float4:out:x86_64-w64-mingw32=float4-exp-three-digits.out -float4:out:i.86-w64-mingw32=float4-exp-three-digits.out -float4:out:i.86-pc-win32vc=float4-exp-three-digits.out float8:out:i.86-.*-freebsd=float8-small-is-zero.out float8:out:i.86-.*-openbsd=float8-small-is-zero.out float8:out:i.86-.*-netbsd=float8-small-is-zero.out float8:out:m68k-.*-netbsd=float8-small-is-zero.out -float8:out:i.86-pc-mingw32=float8-exp-three-digits-win32.out -float8:out:x86_64-w64-mingw32=float8-exp-three-digits-win32.out -float8:out:i.86-w64-mingw32=float8-exp-three-digits-win32.out -float8:out:i.86-pc-win32vc=float8-exp-three-digits-win32.out float8:out:i.86-pc-cygwin=float8-small-is-zero.out -int8:out:i.86-pc-mingw32=int8-exp-three-digits.out -int8:out:x86_64-w64-mingw32=int8-exp-three-digits.out -int8:out:i.86-w64-mingw32=int8-exp-three-digits.out -int8:out:i.86-pc-win32vc=int8-exp-three-digits.out -- 2.40.0