Movatterモバイル変換


[0]ホーム

URL:


Skip to content

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

Sign up
Appearance settings

Commite2ba4ee

Browse files
author
Thomas G. Lockhart
committed
Include tests for new 8-byte integer.
Include tests for HAVING clause.
1 parent5e7beed commite2ba4ee

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

‎src/test/regress/sql/int8.sql

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--
2+
-- Test int8 64-bit integers.
3+
--
4+
CREATETABLEINT8_TBL(q1 int8, q2 int8);
5+
6+
INSERT INTO INT8_TBLVALUES('123','456');
7+
INSERT INTO INT8_TBLVALUES('123','4567890123456789');
8+
INSERT INTO INT8_TBLVALUES('4567890123456789','123');
9+
INSERT INTO INT8_TBLVALUES('4567890123456789','4567890123456789');
10+
INSERT INTO INT8_TBLVALUES('4567890123456789','-4567890123456789');
11+
12+
SELECT*FROM INT8_TBL;
13+
14+
SELECT''AS five, q1AS plus,-q1AS minusFROM INT8_TBL;
15+
16+
SELECT''AS five, q1, q2, q1+ q2AS plusFROM INT8_TBL;
17+
SELECT''AS five, q1, q2, q1- q2AS minusFROM INT8_TBL;
18+
SELECT''AS three, q1, q2, q1* q2AS multiplyFROM INT8_TBL
19+
WHERE q1<1000or (q2>0and q2<1000);
20+
SELECT''AS five, q1, q2, q1/ q2AS divideFROM INT8_TBL;
21+
22+
SELECT''AS five, q1, float8(q1)FROM INT8_TBL;
23+
SELECT''AS five, q2, float8(q2)FROM INT8_TBL;
24+
SELECT''AS five, q1, int8(float8(q1))AS"two coercions"FROM INT8_TBL;
25+
26+
SELECT''AS five,2* q1AS"twice int4"FROM INT8_TBL;
27+
SELECT''AS five, q1*2AS"twice int4"FROM INT8_TBL;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
--
2+
-- select_having.sql
3+
--
4+
5+
SELECT d1,count(*)FROM DATETIME_TBL
6+
GROUP BY d1HAVINGcount(*)>1;
7+

‎src/test/regress/sql/tests

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ text
66
strings
77
int2
88
int4
9+
int8
910
oid
1011
oidint2
1112
oidint4
@@ -45,6 +46,7 @@ select
4546
select_into
4647
select_distinct
4748
select_distinct_on
49+
select_having
4850
subselect
4951
union
5052
aggregates

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp