Include tests for new 8-byte integer.

Include tests for HAVING clause.
This commit is contained in:
Thomas G. Lockhart 1998-07-08 14:31:02 +00:00
parent 5e7beed3eb
commit e2ba4ee2a8
3 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,27 @@
--
-- Test int8 64-bit integers.
--
CREATE TABLE INT8_TBL(q1 int8, q2 int8);
INSERT INTO INT8_TBL VALUES('123','456');
INSERT INTO INT8_TBL VALUES('123','4567890123456789');
INSERT INTO INT8_TBL VALUES('4567890123456789','123');
INSERT INTO INT8_TBL VALUES('4567890123456789','4567890123456789');
INSERT INTO INT8_TBL VALUES('4567890123456789','-4567890123456789');
SELECT * FROM INT8_TBL;
SELECT '' AS five, q1 AS plus, -q1 AS minus FROM INT8_TBL;
SELECT '' AS five, q1, q2, q1 + q2 AS plus FROM INT8_TBL;
SELECT '' AS five, q1, q2, q1 - q2 AS minus FROM INT8_TBL;
SELECT '' AS three, q1, q2, q1 * q2 AS multiply FROM INT8_TBL
WHERE q1 < 1000 or (q2 > 0 and q2 < 1000);
SELECT '' AS five, q1, q2, q1 / q2 AS divide FROM INT8_TBL;
SELECT '' AS five, q1, float8(q1) FROM INT8_TBL;
SELECT '' AS five, q2, float8(q2) FROM INT8_TBL;
SELECT '' AS five, q1, int8(float8(q1)) AS "two coercions" FROM INT8_TBL;
SELECT '' AS five, 2 * q1 AS "twice int4" FROM INT8_TBL;
SELECT '' AS five, q1 * 2 AS "twice int4" FROM INT8_TBL;

View File

@ -0,0 +1,7 @@
--
-- select_having.sql
--
SELECT d1, count(*) FROM DATETIME_TBL
GROUP BY d1 HAVING count(*) > 1;

View File

@ -6,6 +6,7 @@ text
strings
int2
int4
int8
oid
oidint2
oidint4
@ -45,6 +46,7 @@ select
select_into
select_distinct
select_distinct_on
select_having
subselect
union
aggregates