-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more tests and binary convertion functions
- Loading branch information
Showing
3 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
CREATE TABLE sat_agg (id1 saturated_int, id2 saturated_int); | ||
INSERT INTO sat_agg | ||
SELECT i, 1 FROM pg_catalog.generate_series(2147483645::bigint, 2147483650::bigint) g(i); | ||
SELECT * FROM sat_agg; | ||
id1 | id2 | ||
------------+----- | ||
2147483645 | 1 | ||
2147483646 | 1 | ||
2147483647 | 1 | ||
2147483647 | 1 | ||
2147483647 | 1 | ||
2147483647 | 1 | ||
(6 rows) | ||
|
||
-- Test aggregate functions | ||
SELECT sum(id1), sum(id2) FROM sat_agg; | ||
sum | sum | ||
------------+----- | ||
2147483647 | 6 | ||
(1 row) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
CREATE TABLE sat_agg (id1 saturated_int, id2 saturated_int); | ||
|
||
INSERT INTO sat_agg | ||
SELECT i, 1 FROM pg_catalog.generate_series(2147483645::bigint, 2147483650::bigint) g(i); | ||
|
||
SELECT * FROM sat_agg; | ||
|
||
-- Test aggregate functions | ||
SELECT sum(id1), sum(id2) FROM sat_agg; |