Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit aeecb4e

Browse files
author
Thomas G. Lockhart
committed
Add a few tests for unary minus syntax.
1 parent bc85dbf commit aeecb4e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/test/regress/sql/int4.sql

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,19 @@ SELECT '' AS five, i.f1, i.f1 / '2'::int2 AS x FROM INT4_TBL i;
7373

7474
SELECT '' AS five, i.f1, i.f1 / '2'::int4 AS x FROM INT4_TBL i;
7575

76-
7776
--
7877
-- more complex expressions
7978
--
79+
80+
-- variations on unary minus parsing
81+
SELECT -2+3 AS one;
82+
83+
SELECT 4-2 AS two;
84+
85+
SELECT 2- -1 AS three;
86+
87+
SELECT 2 - -2 AS four;
88+
8089
SELECT '2'::int2 * '2'::int2 = '16'::int2 / '4'::int2 AS true;
8190

8291
SELECT '2'::int4 * '2'::int2 = '16'::int2 / '4'::int4 AS true;

0 commit comments

Comments
 (0)