]> granicus.if.org Git - postgresql/commitdiff
Add tests for unary minus.
authorThomas G. Lockhart <lockhart@fourpalms.org>
Sat, 13 Sep 1997 03:20:18 +0000 (03:20 +0000)
committerThomas G. Lockhart <lockhart@fourpalms.org>
Sat, 13 Sep 1997 03:20:18 +0000 (03:20 +0000)
src/test/regress/expected/int4.out

index ed3b9f2d0964e80ace6657f8d42f624877c33256..5abaae14552123038c5a75052605aee9e1db2e97 100644 (file)
@@ -204,6 +204,30 @@ five|         f1|          x
     |-2147483647|-1073741823
 (5 rows)
 
+QUERY: SELECT -2+3 AS one;
+one
+---
+  1
+(1 row)
+
+QUERY: SELECT 4-2 AS two;
+two
+---
+  2
+(1 row)
+
+QUERY: SELECT 2- -1 AS three;
+three
+-----
+    3
+(1 row)
+
+QUERY: SELECT 2 - -2 AS four;
+four
+----
+   4
+(1 row)
+
 QUERY: SELECT '2'::int2 * '2'::int2 = '16'::int2 / '4'::int2 AS true;
 true
 ----