*** /home/stark/src/postgresql/src/test/regress/expected/int2.out Mon Aug 17 18:51:36 2015 --- /home/stark/src/postgresql/src/test/regress/results/int2.out Mon Aug 24 12:12:53 2015 *************** *** 277,289 **** (2.5::float8)) t(x); x | int2_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 --- 277,289 ---- (2.5::float8)) t(x); x | int2_value ------+------------ ! -2.5 | -3 -1.5 | -2 ! -0.5 | -1 0 | 0 ! 0.5 | 1 1.5 | 2 ! 2.5 | 3 (7 rows) -- check rounding when casting from numeric ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/int4.out Mon Aug 17 18:51:36 2015 --- /home/stark/src/postgresql/src/test/regress/results/int4.out Mon Aug 24 12:13:13 2015 *************** *** 374,386 **** (2.5::float8)) t(x); x | int4_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 --- 374,386 ---- (2.5::float8)) t(x); x | int4_value ------+------------ ! -2.5 | -3 -1.5 | -2 ! -0.5 | -1 0 | 0 ! 0.5 | 1 1.5 | 2 ! 2.5 | 3 (7 rows) -- check rounding when casting from numeric ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/int8.out Mon Aug 17 18:51:37 2015 --- /home/stark/src/postgresql/src/test/regress/results/int8.out Mon Aug 24 12:13:23 2015 *************** *** 329,351 **** (5 rows) SELECT '' AS five, q1, float8(q1) FROM INT8_TBL; ! five | q1 | float8 ! ------+------------------+---------------------- ! | 123 | 123 ! | 123 | 123 ! | 4567890123456789 | 4.56789012345679e+15 ! | 4567890123456789 | 4.56789012345679e+15 ! | 4567890123456789 | 4.56789012345679e+15 (5 rows) SELECT '' AS five, q2, float8(q2) FROM INT8_TBL; ! five | q2 | float8 ! ------+-------------------+----------------------- ! | 456 | 456 ! | 4567890123456789 | 4.56789012345679e+15 ! | 123 | 123 ! | 4567890123456789 | 4.56789012345679e+15 ! | -4567890123456789 | -4.56789012345679e+15 (5 rows) SELECT 37 + q1 AS plus4 FROM INT8_TBL; --- 329,351 ---- (5 rows) SELECT '' AS five, q1, float8(q1) FROM INT8_TBL; ! five | q1 | float8 ! ------+------------------+------------------ ! | 123 | 123 ! | 123 | 123 ! | 4567890123456789 | 4567890123456789 ! | 4567890123456789 | 4567890123456789 ! | 4567890123456789 | 4567890123456789 (5 rows) SELECT '' AS five, q2, float8(q2) FROM INT8_TBL; ! five | q2 | float8 ! ------+-------------------+------------------- ! | 456 | 456 ! | 4567890123456789 | 4567890123456789 ! | 123 | 123 ! | 4567890123456789 | 4567890123456789 ! | -4567890123456789 | -4567890123456789 (5 rows) SELECT 37 + q1 AS plus4 FROM INT8_TBL; *************** *** 726,738 **** (1 row) SELECT CAST(q1 AS float4), CAST(q2 AS float8) FROM INT8_TBL; ! q1 | q2 ! -------------+----------------------- ! 123 | 456 ! 123 | 4.56789012345679e+15 ! 4.56789e+15 | 123 ! 4.56789e+15 | 4.56789012345679e+15 ! 4.56789e+15 | -4.56789012345679e+15 (5 rows) SELECT CAST('36854775807.0'::float4 AS int8); --- 726,738 ---- (1 row) SELECT CAST(q1 AS float4), CAST(q2 AS float8) FROM INT8_TBL; ! q1 | q2 ! -------------+------------------- ! 123 | 456 ! 123 | 4567890123456789 ! 4.56789e+15 | 123 ! 4.56789e+15 | 4567890123456789 ! 4.56789e+15 | -4567890123456789 (5 rows) SELECT CAST('36854775807.0'::float4 AS int8); *************** *** 857,869 **** (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 --- 857,869 ---- (2.5::float8)) t(x); x | int8_value ------+------------ ! -2.5 | -3 -1.5 | -2 ! -0.5 | -1 0 | 0 ! 0.5 | 1 1.5 | 2 ! 2.5 | 3 (7 rows) -- check rounding when casting from numeric ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/float4.out Mon Aug 17 18:51:34 2015 --- /home/stark/src/postgresql/src/test/regress/results/float4.out Mon Aug 24 12:13:35 2015 *************** *** 9,27 **** 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 --- 9,29 ---- INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e-20'); -- test for over and under flow INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70'); ! ERROR: floating-point exception LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70'); ^ + DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70'); ! ERROR: floating-point exception LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70'); ^ + DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70'); ! ERROR: "10e-70" is out of range for type real LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70'); ^ INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70'); ! ERROR: "-10e-70" is out of range for type real LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70'); ^ -- bad input *************** *** 59,91 **** ^ -- 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 --- 61,90 ---- ^ -- special inputs SELECT 'NaN'::float4; ! ERROR: floating-point exception ! LINE 1: SELECT 'NaN'::float4; ! ^ ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. SELECT 'nan'::float4; ! ERROR: floating-point exception ! LINE 1: SELECT 'nan'::float4; ! ^ ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. SELECT ' NAN '::float4; ! ERROR: floating-point exception ! LINE 1: SELECT ' NAN '::float4; ! ^ ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. SELECT 'infinity'::float4; ! float4 ! ------------- ! 1.70141e+38 (1 row) SELECT ' -INFINiTY '::float4; ! float4 ! -------------- ! -1.70141e+38 (1 row) -- bad special inputs *************** *** 94,130 **** 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 ------+------------- --- 93,126 ---- LINE 1: SELECT 'N A N'::float4; ^ SELECT 'NaN x'::float4; ! ERROR: floating-point exception LINE 1: SELECT 'NaN x'::float4; ^ + DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. 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? ! ----------------------- ! 1.701411733192644e+38 (1 row) SELECT 'Infinity'::float4 / 'Infinity'::float4; ?column? ---------- ! 1 (1 row) SELECT 'nan'::float4 / 'nan'::float4; ! ERROR: floating-point exception ! LINE 1: SELECT 'nan'::float4 / 'nan'::float4; ! ^ ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. SELECT 'nan'::numeric::float4; ! ERROR: floating-point exception ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. SELECT '' AS five, * FROM FLOAT4_TBL; five | f1 ------+------------- ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/float8.out Mon Aug 17 18:51:34 2015 --- /home/stark/src/postgresql/src/test/regress/results/float8.out Mon Aug 24 12:13:53 2015 *************** *** 7,21 **** 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; --- 7,28 ---- 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'); + ERROR: "1.2345678901234e-200" is out of range for type double precision + LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); + ^ -- test for underflow and overflow handling SELECT '10e400'::float8; ! float8 ! ----------------------- ! 1.701411834604692e+38 ! (1 row) ! SELECT '-10e400'::float8; ! float8 ! ------------------------ ! -1.701411834604692e+38 ! (1 row) ! SELECT '10e-400'::float8; ERROR: "10e-400" is out of range for type double precision LINE 1: SELECT '10e-400'::float8; *************** *** 59,91 **** ^ -- 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 --- 66,95 ---- ^ -- special inputs SELECT 'NaN'::float8; ! ERROR: floating-point exception ! LINE 1: SELECT 'NaN'::float8; ! ^ ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. SELECT 'nan'::float8; ! ERROR: floating-point exception ! LINE 1: SELECT 'nan'::float8; ! ^ ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. SELECT ' NAN '::float8; ! ERROR: floating-point exception ! LINE 1: SELECT ' NAN '::float8; ! ^ ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. SELECT 'infinity'::float8; ! float8 ! ----------------------- ! 1.701411834604692e+38 (1 row) SELECT ' -INFINiTY '::float8; ! float8 ! ------------------------ ! -1.701411834604692e+38 (1 row) -- bad special inputs *************** *** 94,148 **** 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 --- 98,147 ---- LINE 1: SELECT 'N A N'::float8; ^ SELECT 'NaN x'::float8; ! ERROR: floating-point exception LINE 1: SELECT 'NaN x'::float8; ^ + DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. 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? ! ----------------------- ! 1.701411834604692e+38 (1 row) SELECT 'Infinity'::float8 / 'Infinity'::float8; ?column? ---------- ! 1 (1 row) SELECT 'nan'::float8 / 'nan'::float8; ! ERROR: floating-point exception ! LINE 1: SELECT 'nan'::float8 / 'nan'::float8; ! ^ ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. SELECT 'nan'::numeric::float8; ! ERROR: floating-point exception ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. SELECT '' AS five, * FROM FLOAT8_TBL; ! five | f1 ! ------+----------------------- ! | 0 ! | 1004.3 ! | -34.84 ! | 1.701411834604692e+38 ! (4 rows) SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE f.f1 <> '1004.3'; ! four | f1 ! ------+----------------------- ! | 0 ! | -34.84 ! | 1.701411834604692e+38 ! (3 rows) SELECT '' AS one, f.* FROM FLOAT8_TBL f WHERE f.f1 = '1004.3'; one | f1 *************** *** 151,228 **** (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'; --- 150,215 ---- (1 row) SELECT '' AS three, f.* FROM FLOAT8_TBL f WHERE '1004.3' > f.f1; ! three | f1 ! -------+-------- ! | 0 ! | -34.84 ! (2 rows) SELECT '' AS three, f.* FROM FLOAT8_TBL f WHERE f.f1 < '1004.3'; ! three | f1 ! -------+-------- ! | 0 ! | -34.84 ! (2 rows) SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE '1004.3' >= f.f1; ! four | f1 ! ------+-------- ! | 0 ! | 1004.3 ! | -34.84 ! (3 rows) SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE f.f1 <= '1004.3'; ! four | f1 ! ------+-------- ! | 0 ! | 1004.3 ! | -34.84 ! (3 rows) SELECT '' AS three, f.f1, f.f1 * '-10' AS x FROM FLOAT8_TBL f WHERE f.f1 > '0.0'; ! ERROR: floating-point exception ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. 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.701411834604692e+38 | 1.701411834604692e+38 ! (2 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.701411834604692e+38 | -1.701411834604692e+37 ! (2 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.701411834604692e+38 | 1.701411834604692e+38 ! (2 rows) SELECT '' AS one, f.f1 ^ '2.0' AS square_f1 FROM FLOAT8_TBL f where f.f1 = '1004.3'; *************** *** 234,303 **** -- 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; --- 221,284 ---- -- 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.701411834604692e+38 | 1.701411834604692e+38 ! (4 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.701411834604692e+38 | 1.701411834604692e+38 ! (4 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.701411834604692e+38 | 1.701411834604692e+38 ! (4 rows) -- ceil / ceiling select ceil(f1) as ceil_f1 from float8_tbl f; ! ceil_f1 ! ----------------------- ! 0 ! 1005 ! -34 ! 1.701411834604692e+38 ! (4 rows) select ceiling(f1) as ceiling_f1 from float8_tbl f; ! ceiling_f1 ! ----------------------- ! 0 ! 1005 ! -34 ! 1.701411834604692e+38 ! (4 rows) -- floor select floor(f1) as floor_f1 from float8_tbl f; ! floor_f1 ! ----------------------- ! 0 ! 1004 ! -35 ! 1.701411834604692e+38 ! (4 rows) -- sign select sign(f1) as sign_f1 from float8_tbl f; *************** *** 307,314 **** 1 -1 1 ! 1 ! (5 rows) -- square root SELECT sqrt(float8 '64') AS eight; --- 288,294 ---- 1 -1 1 ! (4 rows) -- square root SELECT sqrt(float8 '64') AS eight; *************** *** 326,337 **** 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'); --- 306,316 ---- 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.69069263995345 ! | 1.701411834604692e+38 | 1.304381782533278e+19 ! (2 rows) -- power SELECT power(float8 '144', float8 '0.5'); *************** *** 344,356 **** 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 --- 323,330 ---- SELECT '' AS three, f.f1, exp(ln(f.f1)) AS exp_ln_f1 FROM FLOAT8_TBL f WHERE f.f1 > '0.0'; ! ERROR: floating-point exception ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. -- cube root SELECT ||/ float8 '27' AS three; three *************** *** 359,390 **** (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+66 ! | 1.2345678901234e-200 | 2.3112042409018e-67 ! (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? ---------- --- 333,364 ---- (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.01431283782703 ! | -34.84 | -3.266074213442081 ! | 1.701411834604692e+38 | 5541191377756.636 ! (4 rows) SELECT '' AS five, * FROM FLOAT8_TBL; ! five | f1 ! ------+----------------------- ! | 0 ! | 1004.3 ! | -34.84 ! | 1.701411834604692e+38 ! (4 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: floating-point exception ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f; ! ERROR: floating-point exception ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. SELECT 0 ^ 0 + 0 ^ 1 + 0 ^ 0.0 + 0 ^ 0.5; ?column? ---------- *************** *** 400,423 **** 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'); --- 374,390 ---- 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.701411834604692e+38 ! (4 rows) -- test for over- and underflow INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400'); 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'); *************** *** 434,446 **** 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) --- 401,415 ---- 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'); + ERROR: "-1.2345678901234e-200" is out of range for type double precision + LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e-200'); + ^ SELECT '' AS five, * FROM FLOAT8_TBL; ! five | f1 ! ------+------------------------ ! | 0 ! | -34.84 ! | -1004.3 ! | -1.701411834604692e+38 ! (4 rows) ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/numeric.out Mon Aug 17 18:51:38 2015 --- /home/stark/src/postgresql/src/test/regress/results/numeric.out Mon Aug 24 13:29:19 2015 *************** *** 772,778 **** SELECT width_bucket('NaN', 3.0, 4.0, 888); ERROR: operand, lower bound, and upper bound cannot be NaN SELECT width_bucket(0::float8, 'NaN', 4.0::float8, 888); ! ERROR: operand, lower bound, and upper bound cannot be NaN -- normal operation CREATE TABLE width_bucket_test (operand_num numeric, operand_f8 float8); COPY width_bucket_test (operand_num) FROM stdin; --- 772,781 ---- SELECT width_bucket('NaN', 3.0, 4.0, 888); ERROR: operand, lower bound, and upper bound cannot be NaN SELECT width_bucket(0::float8, 'NaN', 4.0::float8, 888); ! ERROR: floating-point exception ! LINE 1: SELECT width_bucket(0::float8, 'NaN', 4.0::float8, 888); ! ^ ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. -- normal operation CREATE TABLE width_bucket_test (operand_num numeric, operand_f8 float8); COPY width_bucket_test (operand_num) FROM stdin; *************** *** 816,824 **** -- for float8 only, check positive and negative infinity: we require -- finite bucket bounds, but allow an infinite operand SELECT width_bucket(0.0::float8, 'Infinity'::float8, 5, 10); -- error ! ERROR: lower and upper bounds must be finite SELECT width_bucket(0.0::float8, 5, '-Infinity'::float8, 20); -- error ! ERROR: lower and upper bounds must be finite SELECT width_bucket('Infinity'::float8, 1, 10, 10), width_bucket('-Infinity'::float8, 1, 10, 10); width_bucket | width_bucket --- 819,835 ---- -- for float8 only, check positive and negative infinity: we require -- finite bucket bounds, but allow an infinite operand SELECT width_bucket(0.0::float8, 'Infinity'::float8, 5, 10); -- error ! width_bucket ! -------------- ! 11 ! (1 row) ! SELECT width_bucket(0.0::float8, 5, '-Infinity'::float8, 20); -- error ! width_bucket ! -------------- ! 1 ! (1 row) ! SELECT width_bucket('Infinity'::float8, 1, 10, 10), width_bucket('-Infinity'::float8, 1, 10, 10); width_bucket | width_bucket ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/numerology.out Mon Aug 17 18:51:40 2015 --- /home/stark/src/postgresql/src/test/regress/results/numerology.out Mon Aug 24 13:40:01 2015 *************** *** 45,54 **** | -35 | 0 | 0 - | 0 | 1234 | 32767 ! (9 rows) -- int2 CREATE TABLE TEMP_INT2 (f1 INT2); --- 45,53 ---- | -35 | 0 | 0 | 1234 | 32767 ! (8 rows) -- int2 CREATE TABLE TEMP_INT2 (f1 INT2); *************** *** 66,73 **** | -35 | 0 | 0 ! | 0 ! (5 rows) -- -- Group-by combinations --- 65,71 ---- | -35 | 0 | 0 ! (4 rows) -- -- Group-by combinations *************** *** 90,99 **** FROM TEMP_GROUP GROUP BY f1 ORDER BY two, max_float, min_float; ! two | max_float | min_float ! -----+----------------------+----------------------- ! 1 | 1.2345678901234e+200 | -0 ! 2 | 0 | -1.2345678901234e+200 (2 rows) -- GROUP BY a result column name is not legal per SQL92, but we accept it --- 88,97 ---- FROM TEMP_GROUP GROUP BY f1 ORDER BY two, max_float, min_float; ! two | max_float | min_float ! -----+-----------------------+------------------------ ! 1 | 1.701411834604692e+38 | 0 ! 2 | 0 | -1.701411834604692e+38 (2 rows) -- GROUP BY a result column name is not legal per SQL92, but we accept it *************** *** 102,121 **** FROM TEMP_GROUP GROUP BY two ORDER BY two, max_float, min_float; ! two | max_float | min_float ! -----+----------------------+----------------------- ! 1 | 1.2345678901234e+200 | -0 ! 2 | 0 | -1.2345678901234e+200 (2 rows) SELECT f1 AS two, (max(f3) + 1) AS max_plus_1, (min(f3) - 1) AS min_minus_1 FROM TEMP_GROUP GROUP BY f1 ORDER BY two, min_minus_1; ! two | max_plus_1 | min_minus_1 ! -----+----------------------+----------------------- ! 1 | 1.2345678901234e+200 | -1 ! 2 | 1 | -1.2345678901234e+200 (2 rows) SELECT f1 AS two, --- 100,119 ---- FROM TEMP_GROUP GROUP BY two ORDER BY two, max_float, min_float; ! two | max_float | min_float ! -----+-----------------------+------------------------ ! 1 | 1.701411834604692e+38 | 0 ! 2 | 0 | -1.701411834604692e+38 (2 rows) SELECT f1 AS two, (max(f3) + 1) AS max_plus_1, (min(f3) - 1) AS min_minus_1 FROM TEMP_GROUP GROUP BY f1 ORDER BY two, min_minus_1; ! two | max_plus_1 | min_minus_1 ! -----+-----------------------+------------------------ ! 1 | 1.701411834604692e+38 | -1 ! 2 | 1 | -1.701411834604692e+38 (2 rows) SELECT f1 AS two, *************** *** 124,133 **** FROM TEMP_GROUP GROUP BY f1 ORDER BY two, min_minus_1; ! two | max_plus_min | min_minus_1 ! -----+--------------+----------------------- ! 1 | 0 | -1 ! 2 | 0 | -1.2345678901234e+200 (2 rows) DROP TABLE TEMP_INT2; --- 122,131 ---- FROM TEMP_GROUP GROUP BY f1 ORDER BY two, min_minus_1; ! two | max_plus_min | min_minus_1 ! -----+--------------+------------------------ ! 1 | 0 | -1 ! 2 | 0 | -1.701411834604692e+38 (2 rows) DROP TABLE TEMP_INT2; ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/point.out Mon Aug 17 18:51:41 2015 --- /home/stark/src/postgresql/src/test/regress/results/point.out Mon Aug 24 13:40:24 2015 *************** *** 119,175 **** SELECT '' AS six, p.f1, p.f1 <-> point '(0,0)' AS dist FROM POINT_TBL p ORDER BY dist; ! six | f1 | dist ! -----+------------+------------------ ! | (0,0) | 0 ! | (-3,4) | 5 ! | (-10,0) | 10 ! | (-5,-12) | 13 ! | (10,10) | 14.142135623731 ! | (5.1,34.5) | 34.8749193547455 (6 rows) SELECT '' AS thirtysix, p1.f1 AS point1, p2.f1 AS point2, p1.f1 <-> p2.f1 AS dist FROM POINT_TBL p1, POINT_TBL p2 ORDER BY dist, p1.f1[0], p2.f1[0]; ! thirtysix | point1 | point2 | dist ! -----------+------------+------------+------------------ ! | (-10,0) | (-10,0) | 0 ! | (-5,-12) | (-5,-12) | 0 ! | (-3,4) | (-3,4) | 0 ! | (0,0) | (0,0) | 0 ! | (5.1,34.5) | (5.1,34.5) | 0 ! | (10,10) | (10,10) | 0 ! | (-3,4) | (0,0) | 5 ! | (0,0) | (-3,4) | 5 ! | (-10,0) | (-3,4) | 8.06225774829855 ! | (-3,4) | (-10,0) | 8.06225774829855 ! | (-10,0) | (0,0) | 10 ! | (0,0) | (-10,0) | 10 ! | (-10,0) | (-5,-12) | 13 ! | (-5,-12) | (-10,0) | 13 ! | (-5,-12) | (0,0) | 13 ! | (0,0) | (-5,-12) | 13 ! | (0,0) | (10,10) | 14.142135623731 ! | (10,10) | (0,0) | 14.142135623731 ! | (-3,4) | (10,10) | 14.3178210632764 ! | (10,10) | (-3,4) | 14.3178210632764 ! | (-5,-12) | (-3,4) | 16.1245154965971 ! | (-3,4) | (-5,-12) | 16.1245154965971 ! | (-10,0) | (10,10) | 22.3606797749979 ! | (10,10) | (-10,0) | 22.3606797749979 ! | (5.1,34.5) | (10,10) | 24.9851956166046 ! | (10,10) | (5.1,34.5) | 24.9851956166046 ! | (-5,-12) | (10,10) | 26.6270539113887 ! | (10,10) | (-5,-12) | 26.6270539113887 ! | (-3,4) | (5.1,34.5) | 31.5572495632937 ! | (5.1,34.5) | (-3,4) | 31.5572495632937 ! | (0,0) | (5.1,34.5) | 34.8749193547455 ! | (5.1,34.5) | (0,0) | 34.8749193547455 ! | (-10,0) | (5.1,34.5) | 37.6597928831267 ! | (5.1,34.5) | (-10,0) | 37.6597928831267 ! | (-5,-12) | (5.1,34.5) | 47.5842410888311 ! | (5.1,34.5) | (-5,-12) | 47.5842410888311 (36 rows) SELECT '' AS thirty, p1.f1 AS point1, p2.f1 AS point2 --- 119,175 ---- SELECT '' AS six, p.f1, p.f1 <-> point '(0,0)' AS dist FROM POINT_TBL p ORDER BY dist; ! six | f1 | dist ! -----+------------+------------------- ! | (0,0) | 0 ! | (-3,4) | 5 ! | (-10,0) | 10 ! | (-5,-12) | 13 ! | (10,10) | 14.14213562373095 ! | (5.1,34.5) | 34.87491935474547 (6 rows) SELECT '' AS thirtysix, p1.f1 AS point1, p2.f1 AS point2, p1.f1 <-> p2.f1 AS dist FROM POINT_TBL p1, POINT_TBL p2 ORDER BY dist, p1.f1[0], p2.f1[0]; ! thirtysix | point1 | point2 | dist ! -----------+------------+------------+------------------- ! | (-10,0) | (-10,0) | 0 ! | (-5,-12) | (-5,-12) | 0 ! | (-3,4) | (-3,4) | 0 ! | (0,0) | (0,0) | 0 ! | (5.1,34.5) | (5.1,34.5) | 0 ! | (10,10) | (10,10) | 0 ! | (-3,4) | (0,0) | 5 ! | (0,0) | (-3,4) | 5 ! | (-10,0) | (-3,4) | 8.06225774829855 ! | (-3,4) | (-10,0) | 8.06225774829855 ! | (-10,0) | (0,0) | 10 ! | (0,0) | (-10,0) | 10 ! | (-10,0) | (-5,-12) | 13 ! | (-5,-12) | (-10,0) | 13 ! | (-5,-12) | (0,0) | 13 ! | (0,0) | (-5,-12) | 13 ! | (0,0) | (10,10) | 14.14213562373095 ! | (10,10) | (0,0) | 14.14213562373095 ! | (-3,4) | (10,10) | 14.31782106327635 ! | (10,10) | (-3,4) | 14.31782106327635 ! | (-5,-12) | (-3,4) | 16.1245154965971 ! | (-3,4) | (-5,-12) | 16.1245154965971 ! | (-10,0) | (10,10) | 22.3606797749979 ! | (10,10) | (-10,0) | 22.3606797749979 ! | (5.1,34.5) | (10,10) | 24.98519561660465 ! | (10,10) | (5.1,34.5) | 24.98519561660465 ! | (-5,-12) | (10,10) | 26.62705391138869 ! | (10,10) | (-5,-12) | 26.62705391138869 ! | (-3,4) | (5.1,34.5) | 31.55724956329369 ! | (5.1,34.5) | (-3,4) | 31.55724956329369 ! | (0,0) | (5.1,34.5) | 34.87491935474547 ! | (5.1,34.5) | (0,0) | 34.87491935474547 ! | (-10,0) | (5.1,34.5) | 37.65979288312669 ! | (5.1,34.5) | (-10,0) | 37.65979288312669 ! | (-5,-12) | (5.1,34.5) | 47.58424108883108 ! | (5.1,34.5) | (-5,-12) | 47.58424108883108 (36 rows) SELECT '' AS thirty, p1.f1 AS point1, p2.f1 AS point2 *************** *** 214,236 **** FROM POINT_TBL p1, POINT_TBL p2 WHERE (p1.f1 <-> p2.f1) > 3 and p1.f1 << p2.f1 ORDER BY distance, p1.f1[0], p2.f1[0]; ! fifteen | point1 | point2 | distance ! ---------+------------+------------+------------------ ! | (-3,4) | (0,0) | 5 ! | (-10,0) | (-3,4) | 8.06225774829855 ! | (-10,0) | (0,0) | 10 ! | (-10,0) | (-5,-12) | 13 ! | (-5,-12) | (0,0) | 13 ! | (0,0) | (10,10) | 14.142135623731 ! | (-3,4) | (10,10) | 14.3178210632764 ! | (-5,-12) | (-3,4) | 16.1245154965971 ! | (-10,0) | (10,10) | 22.3606797749979 ! | (5.1,34.5) | (10,10) | 24.9851956166046 ! | (-5,-12) | (10,10) | 26.6270539113887 ! | (-3,4) | (5.1,34.5) | 31.5572495632937 ! | (0,0) | (5.1,34.5) | 34.8749193547455 ! | (-10,0) | (5.1,34.5) | 37.6597928831267 ! | (-5,-12) | (5.1,34.5) | 47.5842410888311 (15 rows) -- put distance result into output to allow sorting with GEQ optimizer - tgl 97/05/10 --- 214,236 ---- FROM POINT_TBL p1, POINT_TBL p2 WHERE (p1.f1 <-> p2.f1) > 3 and p1.f1 << p2.f1 ORDER BY distance, p1.f1[0], p2.f1[0]; ! fifteen | point1 | point2 | distance ! ---------+------------+------------+------------------- ! | (-3,4) | (0,0) | 5 ! | (-10,0) | (-3,4) | 8.06225774829855 ! | (-10,0) | (0,0) | 10 ! | (-10,0) | (-5,-12) | 13 ! | (-5,-12) | (0,0) | 13 ! | (0,0) | (10,10) | 14.14213562373095 ! | (-3,4) | (10,10) | 14.31782106327635 ! | (-5,-12) | (-3,4) | 16.1245154965971 ! | (-10,0) | (10,10) | 22.3606797749979 ! | (5.1,34.5) | (10,10) | 24.98519561660465 ! | (-5,-12) | (10,10) | 26.62705391138869 ! | (-3,4) | (5.1,34.5) | 31.55724956329369 ! | (0,0) | (5.1,34.5) | 34.87491935474547 ! | (-10,0) | (5.1,34.5) | 37.65979288312669 ! | (-5,-12) | (5.1,34.5) | 47.58424108883108 (15 rows) -- put distance result into output to allow sorting with GEQ optimizer - tgl 97/05/10 *************** *** 238,248 **** FROM POINT_TBL p1, POINT_TBL p2 WHERE (p1.f1 <-> p2.f1) > 3 and p1.f1 << p2.f1 and p1.f1 >^ p2.f1 ORDER BY distance; ! three | point1 | point2 | distance ! -------+------------+----------+------------------ ! | (-3,4) | (0,0) | 5 ! | (-10,0) | (-5,-12) | 13 ! | (5.1,34.5) | (10,10) | 24.9851956166046 (3 rows) -- Test that GiST indexes provide same behavior as sequential scan --- 238,248 ---- FROM POINT_TBL p1, POINT_TBL p2 WHERE (p1.f1 <-> p2.f1) > 3 and p1.f1 << p2.f1 and p1.f1 >^ p2.f1 ORDER BY distance; ! three | point1 | point2 | distance ! -------+------------+----------+------------------- ! | (-3,4) | (0,0) | 5 ! | (-10,0) | (-5,-12) | 13 ! | (5.1,34.5) | (10,10) | 24.98519561660465 (3 rows) -- Test that GiST indexes provide same behavior as sequential scan ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/line.out Mon Aug 17 18:51:38 2015 --- /home/stark/src/postgresql/src/test/regress/results/line.out Mon Aug 24 13:40:41 2015 *************** *** 39,50 **** LINE 1: INSERT INTO LINE_TBL VALUES ('[(1,2),(3,4)'); ^ select * from LINE_TBL; ! s ! --------------------------------------------- {1,-1,1} {1,-1,0} {-0.4,-1,-6} ! {-0.000184615384615385,-1,15.3846153846154} {1,-1,11} {0,-1,3} {-1,0,3} --- 39,50 ---- LINE 1: INSERT INTO LINE_TBL VALUES ('[(1,2),(3,4)'); ^ select * from LINE_TBL; ! s ! ----------------------------------------------- {1,-1,1} {1,-1,0} {-0.4,-1,-6} ! {-0.0001846153846153846,-1,15.38461538461538} {1,-1,11} {0,-1,3} {-1,0,3} *************** *** 52,63 **** -- functions and operators SELECT * FROM LINE_TBL WHERE (s <-> line '[(1,2),(3,4)]') < 10; ! s ! --------------------------------------------- {1,-1,1} {1,-1,0} {-0.4,-1,-6} ! {-0.000184615384615385,-1,15.3846153846154} {1,-1,11} {0,-1,3} {-1,0,3} --- 52,63 ---- -- functions and operators SELECT * FROM LINE_TBL WHERE (s <-> line '[(1,2),(3,4)]') < 10; ! s ! ----------------------------------------------- {1,-1,1} {1,-1,0} {-0.4,-1,-6} ! {-0.0001846153846153846,-1,15.38461538461538} {1,-1,11} {0,-1,3} {-1,0,3} ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/polygon.out Mon Aug 17 18:51:41 2015 --- /home/stark/src/postgresql/src/test/regress/results/polygon.out Mon Aug 24 13:40:58 2015 *************** *** 222,229 **** '(2,2)'::point <-> '((0,0),(1,4),(3,1))'::polygon as inside, '(3,3)'::point <-> '((0,2),(2,0),(2,2))'::polygon as near_corner, '(4,4)'::point <-> '((0,0),(0,3),(4,0))'::polygon as near_segment; ! on_corner | on_segment | inside | near_corner | near_segment ! -----------+------------+--------+-----------------+-------------- ! 0 | 0 | 0 | 1.4142135623731 | 3.2 (1 row) --- 222,229 ---- '(2,2)'::point <-> '((0,0),(1,4),(3,1))'::polygon as inside, '(3,3)'::point <-> '((0,2),(2,0),(2,2))'::polygon as near_corner, '(4,4)'::point <-> '((0,0),(0,3),(4,0))'::polygon as near_segment; ! on_corner | on_segment | inside | near_corner | near_segment ! -----------+------------+--------+-------------------+-------------- ! 0 | 0 | 0 | 1.414213562373095 | 3.2 (1 row) ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/circle.out Mon Aug 17 18:51:32 2015 --- /home/stark/src/postgresql/src/test/regress/results/circle.out Mon Aug 24 13:41:17 2015 *************** *** 88,99 **** FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE (c1.f1 < c2.f1) AND ((c1.f1 <-> c2.f1) > 0) ORDER BY distance, area(c1.f1), area(c2.f1); ! five | one | two | distance ! ------+----------------+----------------+------------------ ! | <(100,200),10> | <(100,1),115> | 74 ! | <(100,200),10> | <(1,2),100> | 111.370729772479 ! | <(1,3),5> | <(100,200),10> | 205.476756144497 ! | <(5,1),3> | <(100,200),10> | 207.51303816328 ! | <(1,2),3> | <(100,200),10> | 208.370729772479 (5 rows) --- 88,99 ---- FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE (c1.f1 < c2.f1) AND ((c1.f1 <-> c2.f1) > 0) ORDER BY distance, area(c1.f1), area(c2.f1); ! five | one | two | distance ! ------+----------------+----------------+------------------- ! | <(100,200),10> | <(100,1),115> | 74 ! | <(100,200),10> | <(1,2),100> | 111.3707297724792 ! | <(1,3),5> | <(100,200),10> | 205.476756144497 ! | <(5,1),3> | <(100,200),10> | 207.5130381632796 ! | <(1,2),3> | <(100,200),10> | 208.3707297724792 (5 rows) ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/interval.out Mon Aug 17 18:51:37 2015 --- /home/stark/src/postgresql/src/test/regress/results/interval.out Mon Aug 24 13:43:25 2015 *************** *** 834,844 **** select make_interval(years := 'inf'::float::int); ERROR: integer out of range select make_interval(months := 'NaN'::float::int); ! ERROR: integer out of range select make_interval(secs := 'inf'); ! ERROR: interval out of range select make_interval(secs := 'NaN'); ! ERROR: interval out of range select make_interval(secs := 7e12); make_interval ------------------------------------ --- 834,851 ---- select make_interval(years := 'inf'::float::int); ERROR: integer out of range select make_interval(months := 'NaN'::float::int); ! ERROR: floating-point exception ! LINE 1: select make_interval(months := 'NaN'::float::int); ! ^ ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. select make_interval(secs := 'inf'); ! ERROR: floating-point exception ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. select make_interval(secs := 'NaN'); ! ERROR: floating-point exception ! LINE 1: select make_interval(secs := 'NaN'); ! ^ ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. select make_interval(secs := 7e12); make_interval ------------------------------------ ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/geometry_1.out Mon Aug 17 18:51:35 2015 --- /home/stark/src/postgresql/src/test/regress/results/geometry.out Mon Aug 24 13:45:00 2015 *************** *** 54,63 **** SELECT '' AS two, (@@ f1) AS center FROM POLYGON_TBL WHERE (# f1) > 2; ! two | center ! -----+------------------------------- ! | (1.33333333333,1.33333333333) ! | (2.33333333333,1.33333333333) (2 rows) -- "is horizontal" function --- 54,63 ---- SELECT '' AS two, (@@ f1) AS center FROM POLYGON_TBL WHERE (# f1) > 2; ! two | center ! -----+--------------------------------- ! | (1.333333333333,1.333333333333) ! | (2.333333333333,1.333333333333) (2 rows) -- "is horizontal" function *************** *** 111,147 **** -- closest point SELECT '' AS thirty, p.f1, l.s, p.f1 ## l.s AS closest FROM LSEG_TBL l, POINT_TBL p; ! thirty | f1 | s | closest ! --------+------------+-------------------------------+---------------------------------- | (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) | (-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) | (-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) | (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,-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) | (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) (30 rows) --- 111,147 ---- -- closest point SELECT '' AS thirty, p.f1, l.s, p.f1 ## l.s AS closest FROM LSEG_TBL l, POINT_TBL p; ! thirty | f1 | s | closest ! --------+------------+-------------------------------+------------------------------------ | (0,0) | [(1,2),(3,4)] | (1,2) | (0,0) | [(0,0),(6,6)] | (0,0) ! | (0,0) | [(10,-10),(-3,-4)] | (-2.048780487805,-4.439024390244) ! | (0,0) | [(-1000000,200),(300000,-40)] | (0.002840236589587,15.38461486026) | (0,0) | [(11,22),(33,44)] | (11,22) | (-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.997159422582,15.38646101405) | (-10,0) | [(11,22),(33,44)] | (11,22) | (-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.997898122675,15.38516884273) | (-3,4) | [(11,22),(33,44)] | (11,22) | (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.096470832215,15.38367449769) | (5.1,34.5) | [(11,22),(33,44)] | (14.3,25.3) | (-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.643902439024) ! | (-5,-12) | [(-1000000,200),(300000,-40)] | (-4.994944208456,15.38553752816) | (-5,-12) | [(11,22),(33,44)] | (11,22) | (10,10) | [(1,2),(3,4)] | (3,4) | (10,10) | [(0,0),(6,6)] | (6,6) ! | (10,10) | [(10,-10),(-3,-4)] | (2.390243902439,-6.487804878049) ! | (10,10) | [(-1000000,200),(300000,-40)] | (10.00099374198,15.38276904731) | (10,10) | [(11,22),(33,44)] | (11,22) (30 rows) *************** *** 149,162 **** -- 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) (6 rows) -- translation --- 149,162 ---- -- Boxes -- SELECT '' as six, box(f1) AS box FROM CIRCLE_TBL; ! six | box ! -----+-------------------------------------------------------------------- | (7.12132034356,3.12132034356),(2.87867965644,-1.12132034356) ! | (71.71067811865,72.71067811865),(-69.71067811865,-68.71067811865) ! | (4.535533905933,6.535533905933),(-2.535533905933,-0.5355339059327) ! | (3.12132034356,4.12132034356),(-1.12132034356,-0.1213203435596) ! | (107.0710678119,207.0710678119),(92.92893218813,192.9289321881) ! | (181.3172798365,82.31727983645),(18.68272016355,-80.31727983645) (6 rows) -- translation *************** *** 254,280 **** SELECT '' AS twenty, b.f1 / p.f1 AS rotation FROM BOX_TBL b, POINT_TBL p WHERE (p.f1 <-> point '(0,0)') >= 1; ! twenty | rotation ! --------+---------------------------------------------------------------------- | (0,0),(-0.2,-0.2) | (0.08,0),(0,-0.56) ! | (0.0651176557644,0),(0,-0.0483449262493) ! | (0,0.0828402366864),(-0.201183431953,0) | (0.2,0),(0,0) | (-0.1,-0.1),(-0.3,-0.3) | (0.12,-0.28),(0.04,-0.84) ! | (0.0976764836466,-0.0241724631247),(0.0325588278822,-0.072517389374) ! | (-0.100591715976,0.12426035503),(-0.301775147929,0.0414201183432) | (0.3,0),(0.1,0) | (-0.25,-0.25),(-0.25,-0.35) | (0.26,-0.7),(0.1,-0.82) ! | (0.109762715209,-0.0562379754329),(0.0813970697055,-0.0604311578117) ! | (-0.251479289941,0.103550295858),(-0.322485207101,0.0739644970414) | (0.3,0.05),(0.25,0) | (-0.3,-0.3),(-0.3,-0.3) | (0.12,-0.84),(0.12,-0.84) ! | (0.0976764836466,-0.072517389374),(0.0976764836466,-0.072517389374) ! | (-0.301775147929,0.12426035503),(-0.301775147929,0.12426035503) | (0.3,0),(0.3,0) (20 rows) --- 254,280 ---- SELECT '' AS twenty, b.f1 / p.f1 AS rotation FROM BOX_TBL b, POINT_TBL p WHERE (p.f1 <-> point '(0,0)') >= 1; ! twenty | rotation ! --------+--------------------------------------------------------------------------- | (0,0),(-0.2,-0.2) | (0.08,0),(0,-0.56) ! | (0.06511765576439,0),(0,-0.04834492624932) ! | (0,0.08284023668639),(-0.2011834319527,0) | (0.2,0),(0,0) | (-0.1,-0.1),(-0.3,-0.3) | (0.12,-0.28),(0.04,-0.84) ! | (0.09767648364659,-0.02417246312466),(0.0325588278822,-0.07251738937398) ! | (-0.1005917159763,0.1242603550296),(-0.301775147929,0.0414201183432) | (0.3,0),(0.1,0) | (-0.25,-0.25),(-0.25,-0.35) | (0.26,-0.7),(0.1,-0.82) ! | (0.1097627152089,-0.05623797543288),(0.08139706970549,-0.06043115781165) ! | (-0.2514792899408,0.103550295858),(-0.3224852071006,0.07396449704142) | (0.3,0.05),(0.25,0) | (-0.3,-0.3),(-0.3,-0.3) | (0.12,-0.84),(0.12,-0.84) ! | (0.09767648364659,-0.07251738937398),(0.09767648364659,-0.07251738937398) ! | (-0.301775147929,0.1242603550296),(-0.301775147929,0.1242603550296) | (0.3,0),(0.3,0) (20 rows) *************** *** 475,501 **** -- convert circles to polygons using the default number of points SELECT '' AS six, polygon(f1) FROM CIRCLE_TBL; ! six | polygon ! -----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ! | ((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)) ! | ((-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)) ! | ((-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)) ! | ((-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)) ! | ((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)) ! | ((-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) -- convert the circle to an 8-point polygon SELECT '' AS six, polygon(8, f1) FROM CIRCLE_TBL; ! six | polygon ! -----+------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ((2,1),(2.87867965644,3.12132034356),(5,4),(7.12132034356,3.12132034356),(8,1),(7.12132034356,-1.12132034356),(5,-2),(2.87867965644,-1.12132034356)) ! | ((-99,2),(-69.7106781187,72.7106781187),(1,102),(71.7106781187,72.7106781187),(101,2),(71.7106781187,-68.7106781187),(1,-98),(-69.7106781187,-68.7106781187)) ! | ((-4,3),(-2.53553390593,6.53553390593),(1,8),(4.53553390593,6.53553390593),(6,3),(4.53553390593,-0.535533905933),(1,-2),(-2.53553390593,-0.535533905933)) ! | ((-2,2),(-1.12132034356,4.12132034356),(1,5),(3.12132034356,4.12132034356),(4,2),(3.12132034356,-0.12132034356),(1,-1),(-1.12132034356,-0.12132034356)) ! | ((90,200),(92.9289321881,207.071067812),(100,210),(107.071067812,207.071067812),(110,200),(107.071067812,192.928932188),(100,190),(92.9289321881,192.928932188)) ! | ((-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) -- --- 475,501 ---- -- convert circles to polygons using the default number of points SELECT '' AS six, polygon(f1) FROM CIRCLE_TBL; ! six | polygon ! -----+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ! | ((2,1),(2.401923788647,2.5),(3.5,3.598076211353),(5,4),(6.5,3.598076211353),(7.598076211353,2.5),(8,1),(7.598076211353,-0.5),(6.5,-1.598076211353),(5,-2),(3.5,-1.598076211353),(2.401923788647,-0.5)) ! | ((-99,2),(-85.60254037844,52),(-49,88.60254037844),(1,102),(51,88.60254037844),(87.60254037844,52),(101,2),(87.60254037844,-48),(51,-84.60254037844),(1,-98),(-49,-84.60254037844),(-85.60254037844,-48)) ! | ((-4,3),(-3.330127018922,5.5),(-1.5,7.330127018922),(1,8),(3.5,7.330127018922),(5.330127018922,5.5),(6,3),(5.330127018922,0.5),(3.5,-1.330127018922),(1,-2),(-1.5,-1.330127018922),(-3.330127018922,0.5)) ! | ((-2,2),(-1.598076211353,3.5),(-0.5,4.598076211353),(1,5),(2.5,4.598076211353),(3.598076211353,3.5),(4,2),(3.598076211353,0.5),(2.5,-0.5980762113533),(1,-1),(-0.5,-0.5980762113533),(-1.598076211353,0.5)) ! | ((90,200),(91.33974596216,205),(95,208.6602540378),(100,210),(105,208.6602540378),(108.6602540378,205),(110,200),(108.6602540378,195),(105,191.3397459622),(100,190),(95,191.3397459622),(91.33974596216,195)) ! | ((-15,1),(0.4070785647896,58.5),(42.5,100.5929214352),(100,116),(157.5,100.5929214352),(199.5929214352,58.5),(215,1),(199.5929214352,-56.5),(157.5,-98.59292143521),(100,-114),(42.5,-98.59292143521),(0.4070785647896,-56.5)) (6 rows) -- convert the circle to an 8-point polygon SELECT '' AS six, polygon(8, f1) FROM CIRCLE_TBL; ! six | polygon ! -----+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ((2,1),(2.87867965644,3.12132034356),(5,4),(7.12132034356,3.12132034356),(8,1),(7.12132034356,-1.12132034356),(5,-2),(2.87867965644,-1.12132034356)) ! | ((-99,2),(-69.71067811865,72.71067811865),(1,102),(71.71067811865,72.71067811865),(101,2),(71.71067811865,-68.71067811865),(1,-98),(-69.71067811865,-68.71067811865)) ! | ((-4,3),(-2.535533905933,6.535533905933),(1,8),(4.535533905933,6.535533905933),(6,3),(4.535533905933,-0.5355339059327),(1,-2),(-2.535533905933,-0.5355339059327)) ! | ((-2,2),(-1.12132034356,4.12132034356),(1,5),(3.12132034356,4.12132034356),(4,2),(3.12132034356,-0.1213203435596),(1,-1),(-1.12132034356,-0.1213203435596)) ! | ((90,200),(92.92893218813,207.0710678119),(100,210),(107.0710678119,207.0710678119),(110,200),(107.0710678119,192.9289321881),(100,190),(92.92893218813,192.9289321881)) ! | ((-15,1),(18.68272016355,82.31727983645),(100,116),(181.3172798365,82.31727983645),(215,1),(181.3172798365,-80.31727983645),(100,-114),(18.68272016355,-80.31727983645)) (6 rows) -- *************** *** 515,524 **** SELECT '' AS four, circle(f1) FROM BOX_TBL; ! four | circle ! ------+----------------------- ! | <(1,1),1.41421356237> ! | <(2,2),1.41421356237> | <(2.5,3),0.5> | <(3,3),0> (4 rows) --- 515,524 ---- SELECT '' AS four, circle(f1) FROM BOX_TBL; ! four | circle ! ------+------------------------ ! | <(1,1),1.414213562373> ! | <(2,2),1.414213562373> | <(2.5,3),0.5> | <(3,3),0> (4 rows) *************** *** 526,563 **** 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> (2 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> | (-3,4) | 5.54400374532 ! | <(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 ! | <(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 ! | <(1,3),5> | (5.1,34.5) | 26.7657047773 ! | <(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> | (-10,0) | 218.25424421 ! | <(100,200),10> | (-5,-12) | 226.577682802 (21 rows) --- 526,563 ---- SELECT '' AS two, circle(f1) FROM POLYGON_TBL WHERE (# f1) >= 3; ! two | circle ! -----+-------------------------------------------------- ! | <(1.333333333333,1.333333333333),2.041689050636> ! | <(2.333333333333,1.333333333333),1.475343003792> (2 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.099019513593 ! | <(5,1),3> | (-3,4) | 5.544003745318 ! | <(1,3),5> | (-10,0) | 6.401754250991 ! | <(1,3),5> | (10,10) | 6.401754250991 ! | <(5,1),3> | (10,10) | 7.295630140987 ! | <(1,2),3> | (-10,0) | 8.180339887499 ! | <(1,2),3> | (10,10) | 9.041594578792 ! | <(1,3),5> | (-5,-12) | 11.1554944214 ! | <(5,1),3> | (-10,0) | 12.03329637837 ! | <(1,2),3> | (-5,-12) | 12.23154621173 ! | <(5,1),3> | (-5,-12) | 13.40121946686 ! | <(1,3),5> | (5.1,34.5) | 26.76570477732 ! | <(1,2),3> | (5.1,34.5) | 29.75759453928 ! | <(5,1),3> | (5.1,34.5) | 30.5001492534 ! | <(100,200),10> | (5.1,34.5) | 180.7780385684 ! | <(100,200),10> | (10,10) | 200.2379604163 ! | <(100,200),10> | (-3,4) | 211.4158982548 ! | <(100,200),10> | (0,0) | 213.60679775 ! | <(100,200),10> | (-10,0) | 218.2542442103 ! | <(100,200),10> | (-5,-12) | 226.5776828021 (21 rows) ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/updatable_views.out Mon Aug 17 18:51:47 2015 --- /home/stark/src/postgresql/src/test/regress/results/updatable_views.out Mon Aug 24 15:01:58 2015 *************** *** 1200,1217 **** ERROR: cannot insert into column "s" of view "rw_view1" DETAIL: View columns that are not columns of their base relation are not updatable. INSERT INTO rw_view1 (a) VALUES (1.1) RETURNING a, s, c; -- OK ! a | s | c ! -----+-------------------+------------------- ! 1.1 | 0.891207360061435 | 0.453596121425577 (1 row) UPDATE rw_view1 SET s = s WHERE a = 1.1; -- should fail ERROR: cannot update column "s" of view "rw_view1" DETAIL: View columns that are not columns of their base relation are not updatable. UPDATE rw_view1 SET a = 1.05 WHERE a = 1.1 RETURNING s; -- OK ! s ! ------------------- ! 0.867423225594017 (1 row) DELETE FROM rw_view1 WHERE a = 1.05; -- OK --- 1200,1217 ---- ERROR: cannot insert into column "s" of view "rw_view1" DETAIL: View columns that are not columns of their base relation are not updatable. INSERT INTO rw_view1 (a) VALUES (1.1) RETURNING a, s, c; -- OK ! a | s | c ! -----+--------------------+-------------------- ! 1.1 | 0.8912073600614353 | 0.4535961214255774 (1 row) UPDATE rw_view1 SET s = s WHERE a = 1.1; -- should fail ERROR: cannot update column "s" of view "rw_view1" DETAIL: View columns that are not columns of their base relation are not updatable. UPDATE rw_view1 SET a = 1.05 WHERE a = 1.1 RETURNING s; -- OK ! s ! -------------------- ! 0.8674232255940169 (1 row) DELETE FROM rw_view1 WHERE a = 1.05; -- OK *************** *** 1225,1233 **** ERROR: cannot insert into column "s" of view "rw_view1" DETAIL: View columns that are not columns of their base relation are not updatable. INSERT INTO rw_view2(base_a) VALUES (1.1) RETURNING t; -- OK ! t ! ------------------ ! 1.96475965724865 (1 row) UPDATE rw_view2 SET s = s WHERE base_a = 1.1; -- should fail --- 1225,1233 ---- ERROR: cannot insert into column "s" of view "rw_view1" DETAIL: View columns that are not columns of their base relation are not updatable. INSERT INTO rw_view2(base_a) VALUES (1.1) RETURNING t; -- OK ! t ! ------------------- ! 1.964759657248652 (1 row) UPDATE rw_view2 SET s = s WHERE base_a = 1.1; -- should fail *************** *** 1238,1246 **** DETAIL: View columns that are not columns of their base relation are not updatable. UPDATE rw_view2 SET base_a = 1.05 WHERE base_a = 1.1; -- OK DELETE FROM rw_view2 WHERE base_a = 1.05 RETURNING base_a, s, c, t; -- OK ! base_a | s | c | t ! --------+-------------------+-------------------+------------------ ! 1.05 | 0.867423225594017 | 0.497571047891727 | 1.74331530998317 (1 row) CREATE VIEW rw_view3 AS --- 1238,1246 ---- DETAIL: View columns that are not columns of their base relation are not updatable. UPDATE rw_view2 SET base_a = 1.05 WHERE base_a = 1.1; -- OK DELETE FROM rw_view2 WHERE base_a = 1.05 RETURNING base_a, s, c, t; -- OK ! base_a | s | c | t ! --------+--------------------+-------------------+------------------ ! 1.05 | 0.8674232255940169 | 0.497571047891727 | 1.74331530998317 (1 row) CREATE VIEW rw_view3 AS ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/union.out Mon Aug 17 18:51:47 2015 --- /home/stark/src/postgresql/src/test/regress/results/union.out Mon Aug 24 15:12:16 2015 *************** *** 131,209 **** UNION SELECT f1 FROM FLOAT8_TBL ORDER BY 1; ! five ! ----------------------- ! -1.2345678901234e+200 ! -1004.3 ! -34.84 ! -1.2345678901234e-200 ! 0 ! (5 rows) SELECT f1 AS ten FROM FLOAT8_TBL UNION ALL SELECT f1 FROM FLOAT8_TBL; ! ten ! ----------------------- ! 0 ! -34.84 ! -1004.3 ! -1.2345678901234e+200 ! -1.2345678901234e-200 ! 0 ! -34.84 ! -1004.3 ! -1.2345678901234e+200 ! -1.2345678901234e-200 ! (10 rows) SELECT f1 AS nine FROM FLOAT8_TBL UNION SELECT f1 FROM INT4_TBL ORDER BY 1; ! nine ! ----------------------- ! -1.2345678901234e+200 ! -2147483647 ! -123456 ! -1004.3 ! -34.84 ! -1.2345678901234e-200 ! 0 ! 123456 ! 2147483647 ! (9 rows) SELECT f1 AS ten FROM FLOAT8_TBL UNION ALL SELECT f1 FROM INT4_TBL; ! ten ! ----------------------- ! 0 ! -34.84 ! -1004.3 ! -1.2345678901234e+200 ! -1.2345678901234e-200 ! 0 ! 123456 ! -123456 ! 2147483647 ! -2147483647 ! (10 rows) SELECT f1 AS five FROM FLOAT8_TBL WHERE f1 BETWEEN -1e6 AND 1e6 UNION SELECT f1 FROM INT4_TBL WHERE f1 BETWEEN 0 AND 1000000; ! five ! ----------------------- ! -1004.3 ! -34.84 ! -1.2345678901234e-200 ! 0 ! 123456 ! (5 rows) SELECT CAST(f1 AS char(4)) AS three FROM VARCHAR_TBL UNION --- 131,203 ---- UNION SELECT f1 FROM FLOAT8_TBL ORDER BY 1; ! five ! ------------------------ ! -1.701411834604692e+38 ! -1004.3 ! -34.84 ! 0 ! (4 rows) SELECT f1 AS ten FROM FLOAT8_TBL UNION ALL SELECT f1 FROM FLOAT8_TBL; ! ten ! ------------------------ ! 0 ! -34.84 ! -1004.3 ! -1.701411834604692e+38 ! 0 ! -34.84 ! -1004.3 ! -1.701411834604692e+38 ! (8 rows) SELECT f1 AS nine FROM FLOAT8_TBL UNION SELECT f1 FROM INT4_TBL ORDER BY 1; ! nine ! ------------------------ ! -1.701411834604692e+38 ! -2147483647 ! -123456 ! -1004.3 ! -34.84 ! 0 ! 123456 ! 2147483647 ! (8 rows) SELECT f1 AS ten FROM FLOAT8_TBL UNION ALL SELECT f1 FROM INT4_TBL; ! ten ! ------------------------ ! 0 ! -34.84 ! -1004.3 ! -1.701411834604692e+38 ! 0 ! 123456 ! -123456 ! 2147483647 ! -2147483647 ! (9 rows) SELECT f1 AS five FROM FLOAT8_TBL WHERE f1 BETWEEN -1e6 AND 1e6 UNION SELECT f1 FROM INT4_TBL WHERE f1 BETWEEN 0 AND 1000000; ! five ! --------- ! -1004.3 ! -34.84 ! 0 ! 123456 ! (4 rows) SELECT CAST(f1 AS char(4)) AS three FROM VARCHAR_TBL UNION *************** *** 329,341 **** (1 row) SELECT f1 FROM float8_tbl EXCEPT SELECT f1 FROM int4_tbl ORDER BY 1; ! f1 ! ----------------------- ! -1.2345678901234e+200 ! -1004.3 ! -34.84 ! -1.2345678901234e-200 ! (4 rows) -- -- Operator precedence and (((((extra))))) parentheses --- 323,334 ---- (1 row) SELECT f1 FROM float8_tbl EXCEPT SELECT f1 FROM int4_tbl ORDER BY 1; ! f1 ! ------------------------ ! -1.701411834604692e+38 ! -1004.3 ! -34.84 ! (3 rows) -- -- Operator precedence and (((((extra))))) parentheses ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/aggregates.out Mon Aug 17 18:51:31 2015 --- /home/stark/src/postgresql/src/test/regress/results/aggregates.out Mon Aug 24 15:19:37 2015 *************** *** 76,84 **** (1 row) SELECT stddev_pop(b) FROM aggtest; ! stddev_pop ! ----------------- ! 131.10703231895 (1 row) SELECT stddev_samp(b) FROM aggtest; --- 76,84 ---- (1 row) SELECT stddev_pop(b) FROM aggtest; ! stddev_pop ! ------------------- ! 131.1070323189505 (1 row) SELECT stddev_samp(b) FROM aggtest; *************** *** 88,96 **** (1 row) SELECT var_pop(b) FROM aggtest; ! var_pop ! ------------------ ! 17189.0539234823 (1 row) SELECT var_samp(b) FROM aggtest; --- 88,96 ---- (1 row) SELECT var_pop(b) FROM aggtest; ! var_pop ! ------------------- ! 17189.05392348232 (1 row) SELECT var_samp(b) FROM aggtest; *************** *** 218,256 **** (1 row) SELECT regr_sxy(b, a) FROM aggtest; ! regr_sxy ! ------------------ ! 2614.51582155004 (1 row) SELECT regr_avgx(b, a), regr_avgy(b, a) FROM aggtest; ! regr_avgx | regr_avgy ! -----------+------------------ ! 49.5 | 107.943152273074 (1 row) SELECT regr_r2(b, a) FROM aggtest; ! regr_r2 ! -------------------- ! 0.0194977982031803 (1 row) SELECT regr_slope(b, a), regr_intercept(b, a) FROM aggtest; ! regr_slope | regr_intercept ! -------------------+------------------ ! 0.512750700441271 | 82.5619926012309 (1 row) SELECT covar_pop(b, a), covar_samp(b, a) FROM aggtest; ! covar_pop | covar_samp ! -----------------+------------------ ! 653.62895538751 | 871.505273850014 (1 row) SELECT corr(b, a) FROM aggtest; ! corr ! ------------------- ! 0.139634516517873 (1 row) SELECT count(four) AS cnt_1000 FROM onek; --- 218,256 ---- (1 row) SELECT regr_sxy(b, a) FROM aggtest; ! regr_sxy ! ------------------- ! 2614.515821550041 (1 row) SELECT regr_avgx(b, a), regr_avgy(b, a) FROM aggtest; ! regr_avgx | regr_avgy ! -----------+------------------- ! 49.5 | 107.9431522730738 (1 row) SELECT regr_r2(b, a) FROM aggtest; ! regr_r2 ! --------------------- ! 0.01949779820318026 (1 row) SELECT regr_slope(b, a), regr_intercept(b, a) FROM aggtest; ! regr_slope | regr_intercept ! --------------------+------------------- ! 0.5127507004412711 | 82.56199260123087 (1 row) SELECT covar_pop(b, a), covar_samp(b, a) FROM aggtest; ! covar_pop | covar_samp ! -------------------+------------------- ! 653.6289553875104 | 871.5052738500138 (1 row) SELECT corr(b, a) FROM aggtest; ! corr ! -------------------- ! 0.1396345165178734 (1 row) SELECT count(four) AS cnt_1000 FROM onek; *************** *** 1351,1365 **** LINE 1: select p, percentile_cont(p,p) ^ select percentile_cont(0.5) within group (order by b) from aggtest; ! percentile_cont ! ------------------ ! 53.4485001564026 (1 row) select percentile_cont(0.5) within group (order by b), sum(b) from aggtest; ! percentile_cont | sum ! ------------------+--------- ! 53.4485001564026 | 431.773 (1 row) select percentile_cont(0.5) within group (order by thousand) from tenk1; --- 1351,1365 ---- LINE 1: select p, percentile_cont(p,p) ^ select percentile_cont(0.5) within group (order by b) from aggtest; ! percentile_cont ! ------------------- ! 53.44850015640259 (1 row) select percentile_cont(0.5) within group (order by b), sum(b) from aggtest; ! percentile_cont | sum ! -------------------+--------- ! 53.44850015640259 | 431.773 (1 row) select percentile_cont(0.5) within group (order by thousand) from tenk1; ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/arrays.out Mon Aug 17 18:51:32 2015 --- /home/stark/src/postgresql/src/test/regress/results/arrays.out Mon Aug 24 15:27:07 2015 *************** *** 1972,1985 **** (77::float8), ('NaN'::float8) ) v(op); ! op | wb ! ------+---- ! -5.2 | 0 ! 4 | 2 ! 77 | 3 ! NaN | 5 ! (4 rows) ! -- these exercise the generic fixed-width code path SELECT op, --- 1972,1981 ---- (77::float8), ('NaN'::float8) ) v(op); ! ERROR: floating-point exception ! LINE 8: ('NaN'::float8) ! ^ ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. -- these exercise the generic fixed-width code path SELECT op, ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/gist.out Mon Aug 17 18:51:35 2015 --- /home/stark/src/postgresql/src/test/regress/results/gist.out Mon Aug 24 16:30:28 2015 *************** *** 74,83 **** p ------------- (0.2,0.2) - (0.25,0.25) (0.15,0.15) ! (0.3,0.3) (0.1,0.1) (0.35,0.35) (0.05,0.05) (0,0) --- 74,83 ---- p ------------- (0.2,0.2) (0.15,0.15) ! (0.25,0.25) (0.1,0.1) + (0.3,0.3) (0.35,0.35) (0.05,0.05) (0,0) *************** *** 102,111 **** p ------------- (0.1,0.1) - (0.15,0.15) (0.05,0.05) ! (0,0) (0.2,0.2) (0.25,0.25) (0.3,0.3) (0.35,0.35) --- 102,111 ---- p ------------- (0.1,0.1) (0.05,0.05) ! (0.15,0.15) (0.2,0.2) + (0,0) (0.25,0.25) (0.3,0.3) (0.35,0.35) ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/window.out Mon Aug 17 18:51:47 2015 --- /home/stark/src/postgresql/src/test/regress/results/window.out Mon Aug 24 17:36:12 2015 *************** *** 204,236 **** (10 rows) SELECT percent_rank() OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; ! percent_rank | ten | four ! -------------------+-----+------ ! 0 | 0 | 0 ! 0 | 0 | 0 ! 1 | 4 | 0 ! 0 | 1 | 1 ! 0 | 1 | 1 ! 0.666666666666667 | 7 | 1 ! 1 | 9 | 1 ! 0 | 0 | 2 ! 0 | 1 | 3 ! 1 | 3 | 3 (10 rows) SELECT cume_dist() OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; ! cume_dist | ten | four ! -------------------+-----+------ ! 0.666666666666667 | 0 | 0 ! 0.666666666666667 | 0 | 0 ! 1 | 4 | 0 ! 0.5 | 1 | 1 ! 0.5 | 1 | 1 ! 0.75 | 7 | 1 ! 1 | 9 | 1 ! 1 | 0 | 2 ! 0.5 | 1 | 3 ! 1 | 3 | 3 (10 rows) SELECT ntile(3) OVER (ORDER BY ten, four), ten, four FROM tenk1 WHERE unique2 < 10; --- 204,236 ---- (10 rows) SELECT percent_rank() OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; ! percent_rank | ten | four ! --------------------+-----+------ ! 0 | 0 | 0 ! 0 | 0 | 0 ! 1 | 4 | 0 ! 0 | 1 | 1 ! 0 | 1 | 1 ! 0.6666666666666667 | 7 | 1 ! 1 | 9 | 1 ! 0 | 0 | 2 ! 0 | 1 | 3 ! 1 | 3 | 3 (10 rows) SELECT cume_dist() OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; ! cume_dist | ten | four ! --------------------+-----+------ ! 0.6666666666666667 | 0 | 0 ! 0.6666666666666667 | 0 | 0 ! 1 | 4 | 0 ! 0.5 | 1 | 1 ! 0.5 | 1 | 1 ! 0.75 | 7 | 1 ! 1 | 9 | 1 ! 1 | 0 | 2 ! 0.5 | 1 | 3 ! 1 | 3 | 3 (10 rows) SELECT ntile(3) OVER (ORDER BY ten, four), ten, four FROM tenk1 WHERE unique2 < 10; ====================================================================== *** /home/stark/src/postgresql/src/test/regress/expected/json_1.out Mon Aug 17 18:51:37 2015 --- /home/stark/src/postgresql/src/test/regress/results/json.out Mon Aug 24 17:41:17 2015 *************** *** 487,509 **** -- non-numeric output SELECT row_to_json(q) FROM (SELECT 'NaN'::float8 AS "float8field") q; ! row_to_json ! ----------------------- ! {"float8field":"NaN"} ! (1 row) ! SELECT row_to_json(q) FROM (SELECT 'Infinity'::float8 AS "float8field") q; ! row_to_json ! ---------------------------- ! {"float8field":"Infinity"} (1 row) SELECT row_to_json(q) FROM (SELECT '-Infinity'::float8 AS "float8field") q; ! row_to_json ! ----------------------------- ! {"float8field":"-Infinity"} (1 row) -- json input --- 487,508 ---- -- non-numeric output SELECT row_to_json(q) FROM (SELECT 'NaN'::float8 AS "float8field") q; ! ERROR: floating-point exception ! LINE 2: FROM (SELECT 'NaN'::float8 AS "float8field") q; ! ^ ! DETAIL: An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid operation, such as division by zero. SELECT row_to_json(q) FROM (SELECT 'Infinity'::float8 AS "float8field") q; ! row_to_json ! --------------------------------------- ! {"float8field":1.701411834604692e+38} (1 row) SELECT row_to_json(q) FROM (SELECT '-Infinity'::float8 AS "float8field") q; ! row_to_json ! ---------------------------------------- ! {"float8field":-1.701411834604692e+38} (1 row) -- json input ======================================================================