Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
4405a85d
Commit
4405a85d
authored
Jul 08, 1998
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include tests for new 8-byte integer (minimal).
Include tests for HAVING clause.
parent
33dd5c44
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
127 additions
and
0 deletions
+127
-0
src/test/regress/expected/int8.out
src/test/regress/expected/int8.out
+115
-0
src/test/regress/expected/select_having.out
src/test/regress/expected/select_having.out
+12
-0
No files found.
src/test/regress/expected/int8.out
0 → 100644
View file @
4405a85d
QUERY: CREATE TABLE INT8_TBL(q1 int8, q2 int8);
QUERY: INSERT INTO INT8_TBL VALUES('123','456');
QUERY: INSERT INTO INT8_TBL VALUES('123','4567890123456789');
QUERY: INSERT INTO INT8_TBL VALUES('4567890123456789','123');
QUERY: INSERT INTO INT8_TBL VALUES('4567890123456789','4567890123456789');
QUERY: INSERT INTO INT8_TBL VALUES('4567890123456789','-4567890123456789');
QUERY: SELECT * FROM INT8_TBL;
q1| q2
----------------+-----------------
123| 456
123| 4567890123456789
4567890123456789| 123
4567890123456789| 4567890123456789
4567890123456789|-4567890123456789
(5 rows)
QUERY: SELECT '' AS five, q1 AS plus, -q1 AS minus FROM INT8_TBL;
five| plus| minus
----+----------------+-----------------
| 123| -123
| 123| -123
|4567890123456789|-4567890123456789
|4567890123456789|-4567890123456789
|4567890123456789|-4567890123456789
(5 rows)
QUERY: SELECT '' AS five, q1, q2, q1 + q2 AS plus FROM INT8_TBL;
five| q1| q2| plus
----+----------------+-----------------+----------------
| 123| 456| 579
| 123| 4567890123456789|4567890123456912
|4567890123456789| 123|4567890123456912
|4567890123456789| 4567890123456789|9135780246913578
|4567890123456789|-4567890123456789| 0
(5 rows)
QUERY: SELECT '' AS five, q1, q2, q1 - q2 AS minus FROM INT8_TBL;
five| q1| q2| minus
----+----------------+-----------------+-----------------
| 123| 456| -333
| 123| 4567890123456789|-4567890123456666
|4567890123456789| 123| 4567890123456666
|4567890123456789| 4567890123456789| 0
|4567890123456789|-4567890123456789| 9135780246913578
(5 rows)
QUERY: SELECT '' AS three, q1, q2, q1 * q2 AS multiply FROM INT8_TBL
WHERE q1 < 1000 or (q2 > 0 and q2 < 1000);
three| q1| q2| multiply
-----+----------------+----------------+------------------
| 123| 456| 56088
| 123|4567890123456789|561850485185185047
|4567890123456789| 123|561850485185185047
(3 rows)
QUERY: SELECT '' AS five, q1, q2, q1 / q2 AS divide FROM INT8_TBL;
five| q1| q2| divide
----+----------------+-----------------+--------------
| 123| 456| 0
| 123| 4567890123456789| 0
|4567890123456789| 123|37137318076884
|4567890123456789| 4567890123456789| 1
|4567890123456789|-4567890123456789| -1
(5 rows)
QUERY: SELECT '' AS five, q1, float8(q1) FROM INT8_TBL;
five| q1|float8
----+----------------+--------------------
| 123|123
| 123|123
|4567890123456789|4.56789012345679e+15
|4567890123456789|4.56789012345679e+15
|4567890123456789|4.56789012345679e+15
(5 rows)
QUERY: SELECT '' AS five, q2, float8(q2) FROM INT8_TBL;
five| q2|float8
----+-----------------+---------------------
| 456|456
| 4567890123456789|4.56789012345679e+15
| 123|123
| 4567890123456789|4.56789012345679e+15
|-4567890123456789|-4.56789012345679e+15
(5 rows)
QUERY: SELECT '' AS five, q1, int8(float8(q1)) AS "two coercions" FROM INT8_TBL;
five| q1| two coercions
----+----------------+----------------
| 123| 123
| 123| 123
|4567890123456789|4567890123456789
|4567890123456789|4567890123456789
|4567890123456789|4567890123456789
(5 rows)
QUERY: SELECT '' AS five, 2 * q1 AS "twice int4" FROM INT8_TBL;
five| twice int4
----+----------------
| 246
| 246
|9135780246913578
|9135780246913578
|9135780246913578
(5 rows)
QUERY: SELECT '' AS five, q1 * 2 AS "twice int4" FROM INT8_TBL;
five| twice int4
----+----------------
| 246
| 246
|9135780246913578
|9135780246913578
|9135780246913578
(5 rows)
src/test/regress/expected/select_having.out
0 → 100644
View file @
4405a85d
QUERY: SELECT d1, count(*) FROM DATETIME_TBL
GROUP BY d1 HAVING count(*) > 1;
d1 |count
----------------------------+-----
Thu Jun 13 00:00:00 1957 PDT| 2
Mon Feb 10 09:32:01 1997 PST| 3
Mon Feb 10 17:32:01 1997 PST| 13
Sun Feb 16 17:32:01 1997 PST| 2
Sat Mar 01 17:32:01 1997 PST| 2
invalid | 2
(6 rows)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment