Commit aeecb4e5 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Add a few tests for unary minus syntax.

parent bc85dbf8
...@@ -73,10 +73,19 @@ SELECT '' AS five, i.f1, i.f1 / '2'::int2 AS x FROM INT4_TBL i; ...@@ -73,10 +73,19 @@ SELECT '' AS five, i.f1, i.f1 / '2'::int2 AS x FROM INT4_TBL i;
SELECT '' AS five, i.f1, i.f1 / '2'::int4 AS x FROM INT4_TBL i; SELECT '' AS five, i.f1, i.f1 / '2'::int4 AS x FROM INT4_TBL i;
-- --
-- more complex expressions -- more complex expressions
-- --
-- variations on unary minus parsing
SELECT -2+3 AS one;
SELECT 4-2 AS two;
SELECT 2- -1 AS three;
SELECT 2 - -2 AS four;
SELECT '2'::int2 * '2'::int2 = '16'::int2 / '4'::int2 AS true; SELECT '2'::int2 * '2'::int2 = '16'::int2 / '4'::int2 AS true;
SELECT '2'::int4 * '2'::int2 = '16'::int2 / '4'::int4 AS true; SELECT '2'::int4 * '2'::int2 = '16'::int2 / '4'::int4 AS true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment