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
04d975f0
Commit
04d975f0
authored
Oct 04, 2001
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make regress tests safe for variable-resolution timestamps.
parent
64dff0be
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
src/test/regress/expected/timestamp.out
src/test/regress/expected/timestamp.out
+3
-1
src/test/regress/expected/timestamptz.out
src/test/regress/expected/timestamptz.out
+1
-1
src/test/regress/sql/timestamp.sql
src/test/regress/sql/timestamp.sql
+3
-1
src/test/regress/sql/timestamptz.sql
src/test/regress/sql/timestamptz.sql
+1
-1
No files found.
src/test/regress/expected/timestamp.out
View file @
04d975f0
...
...
@@ -7,6 +7,8 @@ CREATE TABLE TIMESTAMP_TBL ( d1 timestamp(2) without time zone);
-- Shorthand values
-- Not directly usable for regression testing since these are not constants.
-- So, just try to test parser and hope for the best - thomas 97/04/26
-- NB: could get a failure if local midnight passes during the next few
-- statements.
INSERT INTO TIMESTAMP_TBL VALUES ('now');
INSERT INTO TIMESTAMP_TBL VALUES ('current');
INSERT INTO TIMESTAMP_TBL VALUES ('today');
...
...
@@ -43,7 +45,7 @@ DELETE FROM TIMESTAMP_TBL;
BEGIN;
INSERT INTO TIMESTAMP_TBL VALUES ('now');
INSERT INTO TIMESTAMP_TBL VALUES ('now');
SELECT count(*) AS two FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'now';
SELECT count(*) AS two FROM TIMESTAMP_TBL WHERE d1 = timestamp
(2)
without time zone 'now';
two
-----
2
...
...
src/test/regress/expected/timestamptz.out
View file @
04d975f0
...
...
@@ -40,7 +40,7 @@ DELETE FROM TIMESTAMPTZ_TBL;
BEGIN;
INSERT INTO TIMESTAMPTZ_TBL VALUES ('now');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('now');
SELECT count(*) AS two FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'now';
SELECT count(*) AS two FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp
(2)
with time zone 'now';
two
-----
2
...
...
src/test/regress/sql/timestamp.sql
View file @
04d975f0
...
...
@@ -9,6 +9,8 @@ CREATE TABLE TIMESTAMP_TBL ( d1 timestamp(2) without time zone);
-- Shorthand values
-- Not directly usable for regression testing since these are not constants.
-- So, just try to test parser and hope for the best - thomas 97/04/26
-- NB: could get a failure if local midnight passes during the next few
-- statements.
INSERT
INTO
TIMESTAMP_TBL
VALUES
(
'now'
);
INSERT
INTO
TIMESTAMP_TBL
VALUES
(
'current'
);
...
...
@@ -29,7 +31,7 @@ DELETE FROM TIMESTAMP_TBL;
BEGIN
;
INSERT
INTO
TIMESTAMP_TBL
VALUES
(
'now'
);
INSERT
INTO
TIMESTAMP_TBL
VALUES
(
'now'
);
SELECT
count
(
*
)
AS
two
FROM
TIMESTAMP_TBL
WHERE
d1
=
timestamp
without
time
zone
'now'
;
SELECT
count
(
*
)
AS
two
FROM
TIMESTAMP_TBL
WHERE
d1
=
timestamp
(
2
)
without
time
zone
'now'
;
END
;
DELETE
FROM
TIMESTAMP_TBL
;
...
...
src/test/regress/sql/timestamptz.sql
View file @
04d975f0
...
...
@@ -25,7 +25,7 @@ DELETE FROM TIMESTAMPTZ_TBL;
BEGIN
;
INSERT
INTO
TIMESTAMPTZ_TBL
VALUES
(
'now'
);
INSERT
INTO
TIMESTAMPTZ_TBL
VALUES
(
'now'
);
SELECT
count
(
*
)
AS
two
FROM
TIMESTAMPTZ_TBL
WHERE
d1
=
timestamp
with
time
zone
'now'
;
SELECT
count
(
*
)
AS
two
FROM
TIMESTAMPTZ_TBL
WHERE
d1
=
timestamp
(
2
)
with
time
zone
'now'
;
END
;
DELETE
FROM
TIMESTAMPTZ_TBL
;
...
...
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