8000 Add a few tests for unary minus syntax. · postgrespro/postgres_cluster@aeecb4e · GitHub
[go: up one dir, main page]

Skip to content
< 8000 header class="HeaderMktg header-logged-out js-details-container js-header Details f4 py-3" role="banner" data-is-top="true" data-color-mode=light data-light-theme=light data-dark-theme=dark>

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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)
0