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
1d7b6f14
Commit
1d7b6f14
authored
Dec 01, 1997
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust tests to reflect removal of time travel.
Add tests for strings and varchar.
parent
f901971c
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
21 deletions
+78
-21
src/test/regress/sql/alter_table.sql
src/test/regress/sql/alter_table.sql
+2
-2
src/test/regress/sql/boolean.sql
src/test/regress/sql/boolean.sql
+30
-4
src/test/regress/sql/char.sql
src/test/regress/sql/char.sql
+24
-0
src/test/regress/sql/char16.sql
src/test/regress/sql/char16.sql
+9
-0
src/test/regress/sql/select_views.sql
src/test/regress/sql/select_views.sql
+4
-3
src/test/regress/sql/tests
src/test/regress/sql/tests
+3
-2
src/test/regress/sql/text.sql
src/test/regress/sql/text.sql
+6
-10
No files found.
src/test/regress/sql/alter_table.sql
View file @
1d7b6f14
...
@@ -70,7 +70,7 @@ DROP TABLE temp;
...
@@ -70,7 +70,7 @@ DROP TABLE temp;
-- the wolf bug - schema mods caused inconsistent row descriptors
-- the wolf bug - schema mods caused inconsistent row descriptors
CREATE
TABLE
temp
(
CREATE
TABLE
temp
(
initial
int4
initial
int4
)
ARCHIVE
=
light
;
);
ALTER
TABLE
temp
ADD
COLUMN
a
int4
;
ALTER
TABLE
temp
ADD
COLUMN
a
int4
;
...
@@ -132,7 +132,7 @@ INSERT INTO temp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u,
...
@@ -132,7 +132,7 @@ INSERT INTO temp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u,
'(0,2,4.1,4.1,3.1,3.1)'
,
'(4.1,4.1,3.1,3.1)'
,
'["current" "infinity"]'
,
'(0,2,4.1,4.1,3.1,3.1)'
,
'(4.1,4.1,3.1,3.1)'
,
'["current" "infinity"]'
,
'1/3'
,
'1,char16'
,
'{1.0,2.0,3.0,4.0}'
,
'{1.0,2.0,3.0,4.0}'
,
'{1,2,3,4}'
);
'1/3'
,
'1,char16'
,
'{1.0,2.0,3.0,4.0}'
,
'{1.0,2.0,3.0,4.0}'
,
'{1,2,3,4}'
);
SELECT
*
FROM
temp
[,]
;
SELECT
*
FROM
temp
;
DROP
TABLE
temp
;
DROP
TABLE
temp
;
...
...
src/test/regress/sql/boolean.sql
View file @
1d7b6f14
--
--
-- boolean.source
-- boolean.source
--
--
-- $Header: /cvsroot/pgsql/src/test/regress/sql/boolean.sql,v 1.
4 1997/10/25 06:02:33
thomas Exp $
-- $Header: /cvsroot/pgsql/src/test/regress/sql/boolean.sql,v 1.
5 1997/12/01 02:45:59
thomas Exp $
--
--
--
--
...
@@ -72,12 +72,11 @@ INSERT INTO BOOLTBL2 (f1) VALUES ('False'::bool);
...
@@ -72,12 +72,11 @@ INSERT INTO BOOLTBL2 (f1) VALUES ('False'::bool);
INSERT
INTO
BOOLTBL2
(
f1
)
VALUES
(
'FALSE'
::
bool
);
INSERT
INTO
BOOLTBL2
(
f1
)
VALUES
(
'FALSE'
::
bool
);
--
t
his is now an invalid expression
--
T
his is now an invalid expression
-- pre-v6.3 this evaluated to false - thomas 1997-10-23
--
For
pre-v6.3 this evaluated to false - thomas 1997-10-23
INSERT
INTO
BOOLTBL2
(
f1
)
INSERT
INTO
BOOLTBL2
(
f1
)
VALUES
(
'XXX'
::
bool
);
VALUES
(
'XXX'
::
bool
);
-- BOOLTBL2 should be full of false's at this point
-- BOOLTBL2 should be full of false's at this point
SELECT
''
AS
f_4
,
BOOLTBL2
.
*
;
SELECT
''
AS
f_4
,
BOOLTBL2
.
*
;
...
@@ -98,6 +97,33 @@ SELECT '' AS tf_12_ff_4, BOOLTBL1.*, BOOLTBL2.*
...
@@ -98,6 +97,33 @@ SELECT '' AS tf_12_ff_4, BOOLTBL1.*, BOOLTBL2.*
WHERE
BOOLTBL2
.
f1
=
BOOLTBL1
.
f1
or
BOOLTBL1
.
f1
=
'true'
::
bool
WHERE
BOOLTBL2
.
f1
=
BOOLTBL1
.
f1
or
BOOLTBL1
.
f1
=
'true'
::
bool
ORDER
BY
BOOLTBL1
.
f1
,
BOOLTBL2
.
f1
;
ORDER
BY
BOOLTBL1
.
f1
,
BOOLTBL2
.
f1
;
--
-- SQL92 syntax - thomas 1997-11-30
--
SELECT
''
AS
"True"
,
BOOLTBL1
.
*
FROM
BOOLTBL1
WHERE
f1
IS
TRUE
;
SELECT
''
AS
"Not False"
,
BOOLTBL1
.
*
FROM
BOOLTBL1
WHERE
f1
IS
NOT
FALSE
;
SELECT
''
AS
"False"
,
BOOLTBL1
.
*
FROM
BOOLTBL1
WHERE
f1
IS
FALSE
;
SELECT
''
AS
"Not True"
,
BOOLTBL1
.
*
FROM
BOOLTBL1
WHERE
f1
IS
NOT
TRUE
;
--
-- Clean up
-- Many tables are retained by the regression test, but these do not seem
-- particularly useful so just get rid of them for now.
-- - thomas 1997-11-30
--
DROP
TABLE
BOOLTBL1
;
DROP
TABLE
BOOLTBL1
;
DROP
TABLE
BOOLTBL2
;
DROP
TABLE
BOOLTBL2
;
src/test/regress/sql/char.sql
View file @
1d7b6f14
...
@@ -3,6 +3,17 @@
...
@@ -3,6 +3,17 @@
-- all inputs are SILENTLY truncated at 1 character
-- all inputs are SILENTLY truncated at 1 character
--
--
-- fixed-length by value
-- internally passed by value if <= 4 bytes in storage
-- Not sure why this is a really useful test,
-- but this test has been here forever. - thomas 1997-11-30
SELECT
'c'
::
char
=
'c'
::
char
AS
true
;
--
-- Build a table for testing
--
CREATE
TABLE
CHAR_TBL
(
f1
char
);
CREATE
TABLE
CHAR_TBL
(
f1
char
);
INSERT
INTO
CHAR_TBL
(
f1
)
VALUES
(
'a'
);
INSERT
INTO
CHAR_TBL
(
f1
)
VALUES
(
'a'
);
...
@@ -51,3 +62,16 @@ SELECT '' AS two, c.*
...
@@ -51,3 +62,16 @@ SELECT '' AS two, c.*
DROP
TABLE
CHAR_TBL
;
DROP
TABLE
CHAR_TBL
;
--
-- Now test longer arrays of char
--
CREATE
TABLE
CHAR_TBL
(
f1
char
(
4
));
INSERT
INTO
CHAR_TBL
(
f1
)
VALUES
(
'a'
);
INSERT
INTO
CHAR_TBL
(
f1
)
VALUES
(
'ab'
);
INSERT
INTO
CHAR_TBL
(
f1
)
VALUES
(
'abcd'
);
INSERT
INTO
CHAR_TBL
(
f1
)
VALUES
(
'abcde'
);
SELECT
''
AS
four
,
CHAR_TBL
.
*
;
src/test/regress/sql/char16.sql
View file @
1d7b6f14
...
@@ -3,6 +3,15 @@
...
@@ -3,6 +3,15 @@
-- all inputs are silently truncated at 16 characters
-- all inputs are silently truncated at 16 characters
--
--
-- fixed-length by reference
SELECT
'char 16 string'
::
char16
=
'char 16 string'
::
char16
AS
"True"
;
SELECT
'char 16 string'
::
char16
=
'char 16 string '
::
char16
AS
"False"
;
--
--
--
CREATE
TABLE
CHAR16_TBL
(
f1
char16
);
CREATE
TABLE
CHAR16_TBL
(
f1
char16
);
INSERT
INTO
CHAR16_TBL
(
f1
)
VALUES
(
'ABCDEFGHIJKLMNOP'
);
INSERT
INTO
CHAR16_TBL
(
f1
)
VALUES
(
'ABCDEFGHIJKLMNOP'
);
...
...
src/test/regress/sql/select_views.sql
View file @
1d7b6f14
...
@@ -3,9 +3,10 @@
...
@@ -3,9 +3,10 @@
--
--
-- test the views defined in create.source
-- test the views defined in create.source
--
--
SELECT
*
from
street
;
SELECT
*
FROM
street
;
SELECT
*
from
iexit
;
SELECT
*
FROM
iexit
ORDER
BY
1
,
2
;
SELECT
*
from
toyemp
where
name
=
'sharon'
;
SELECT
*
FROM
toyemp
WHERE
name
=
'sharon'
;
src/test/regress/sql/tests
View file @
1d7b6f14
boolean
boolean
char
char
char16
char2
char2
char4
char4
char8
char8
char16
varchar
text
text
strings
int2
int2
int4
int4
oid
oid
...
@@ -56,5 +58,4 @@ btree_index
...
@@ -56,5 +58,4 @@ btree_index
hash_index
hash_index
select_views
select_views
alter_table
alter_table
purge
portals_p2
portals_p2
src/test/regress/sql/text.sql
View file @
1d7b6f14
-- *************testing built-in type text ****************
-- *************testing built-in type text ****************
--
-- adt operators in the target list
--
-- fixed-length by reference
SELECT
'char 16 string'
::
char16
=
'char 16 string '
::
char16
AS
false
;
-- fixed-length by value
SELECT
'c'
::
char
=
'c'
::
char
AS
true
;
-- variable-length
SELECT
'this is a text string'
::
text
=
'this is a text string'
::
text
AS
true
;
SELECT
'this is a text string'
::
text
=
'this is a text string'
::
text
AS
true
;
SELECT
'this is a text string'
::
text
=
'this is a text strin'
::
text
AS
false
;
SELECT
'this is a text string'
::
text
=
'this is a text strin'
::
text
AS
false
;
CREATE
TABLE
TEXT_TBL
(
f1
text
);
INSERT
INTO
TEXT_TBL
VALUES
(
'doh!'
);
INSERT
INTO
TEXT_TBL
VALUES
(
'hi de ho neighbor'
);
SELECT
''
AS
two
,
*
FROM
TEXT_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