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

Commit1d7b6f1

Browse files
author
Thomas G. Lockhart
committed
Adjust tests to reflect removal of time travel.
Add tests for strings and varchar.
1 parentf901971 commit1d7b6f1

File tree

7 files changed

+78
-21
lines changed

7 files changed

+78
-21
lines changed

‎src/test/regress/sql/alter_table.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ DROP TABLE temp;
7070
-- the wolf bug - schema mods caused inconsistent row descriptors
7171
CREATETABLEtemp (
7272
initial int4
73-
) ARCHIVE= light;
73+
);
7474

7575
ALTERTABLE temp ADD COLUMN a int4;
7676

@@ -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,
132132
'(0,2,4.1,4.1,3.1,3.1)','(4.1,4.1,3.1,3.1)','["current" "infinity"]',
133133
'1/3','1,char16','{1.0,2.0,3.0,4.0}','{1.0,2.0,3.0,4.0}','{1,2,3,4}');
134134

135-
SELECT*FROM temp[,];
135+
SELECT*FROM temp;
136136

137137
DROPTABLE temp;
138138

‎src/test/regress/sql/boolean.sql

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--
22
-- boolean.source
33
--
4-
-- $Header: /cvsroot/pgsql/src/test/regress/sql/boolean.sql,v 1.4 1997/10/25 06:02:33 thomas Exp $
4+
-- $Header: /cvsroot/pgsql/src/test/regress/sql/boolean.sql,v 1.5 1997/12/0102:45:59 thomas Exp $
55
--
66

77
--
@@ -72,12 +72,11 @@ INSERT INTO BOOLTBL2 (f1) VALUES ('False'::bool);
7272

7373
INSERT INTO BOOLTBL2 (f1)VALUES ('FALSE'::bool);
7474

75-
--this is now an invalid expression
76-
-- pre-v6.3 this evaluated to false - thomas 1997-10-23
75+
--This is now an invalid expression
76+
--Forpre-v6.3 this evaluated to false - thomas 1997-10-23
7777
INSERT INTO BOOLTBL2 (f1)
7878
VALUES ('XXX'::bool);
7979

80-
8180
-- BOOLTBL2 should be full of false's at this point
8281
SELECT''AS f_4, BOOLTBL2.*;
8382

@@ -98,6 +97,33 @@ SELECT '' AS tf_12_ff_4, BOOLTBL1.*, BOOLTBL2.*
9897
WHEREBOOLTBL2.f1=BOOLTBL1.f1orBOOLTBL1.f1='true'::bool
9998
ORDER BYBOOLTBL1.f1,BOOLTBL2.f1;
10099

100+
--
101+
-- SQL92 syntax - thomas 1997-11-30
102+
--
103+
104+
SELECT''AS"True", BOOLTBL1.*
105+
FROM BOOLTBL1
106+
WHERE f1 IS TRUE;
107+
108+
SELECT''AS"Not False", BOOLTBL1.*
109+
FROM BOOLTBL1
110+
WHERE f1 IS NOT FALSE;
111+
112+
SELECT''AS"False", BOOLTBL1.*
113+
FROM BOOLTBL1
114+
WHERE f1 IS FALSE;
115+
116+
SELECT''AS"Not True", BOOLTBL1.*
117+
FROM BOOLTBL1
118+
WHERE f1 IS NOT TRUE;
119+
120+
--
121+
-- Clean up
122+
-- Many tables are retained by the regression test, but these do not seem
123+
-- particularly useful so just get rid of them for now.
124+
-- - thomas 1997-11-30
125+
--
126+
101127
DROPTABLE BOOLTBL1;
102128

103129
DROPTABLE BOOLTBL2;

‎src/test/regress/sql/char.sql

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
-- all inputs are SILENTLY truncated at 1 character
44
--
55

6+
-- fixed-length by value
7+
-- internally passed by value if <= 4 bytes in storage
8+
-- Not sure why this is a really useful test,
9+
-- but this test has been here forever. - thomas 1997-11-30
10+
11+
SELECT'c'::char='c'::charAS true;
12+
13+
--
14+
-- Build a table for testing
15+
--
16+
617
CREATETABLECHAR_TBL(f1char);
718

819
INSERT INTO CHAR_TBL (f1)VALUES ('a');
@@ -51,3 +62,16 @@ SELECT '' AS two, c.*
5162

5263
DROPTABLE CHAR_TBL;
5364

65+
--
66+
-- Now test longer arrays of char
67+
--
68+
69+
CREATETABLECHAR_TBL(f1char(4));
70+
71+
INSERT INTO CHAR_TBL (f1)VALUES ('a');
72+
INSERT INTO CHAR_TBL (f1)VALUES ('ab');
73+
INSERT INTO CHAR_TBL (f1)VALUES ('abcd');
74+
INSERT INTO CHAR_TBL (f1)VALUES ('abcde');
75+
76+
SELECT''AS four, CHAR_TBL.*;
77+

‎src/test/regress/sql/char16.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
-- all inputs are silently truncated at 16 characters
44
--
55

6+
-- fixed-length by reference
7+
SELECT'char 16 string'::char16='char 16 string'::char16AS"True";
8+
9+
SELECT'char 16 string'::char16='char 16 string'::char16AS"False";
10+
11+
--
12+
--
13+
--
14+
615
CREATETABLECHAR16_TBL(f1 char16);
716

817
INSERT INTO CHAR16_TBL(f1)VALUES ('ABCDEFGHIJKLMNOP');

‎src/test/regress/sql/select_views.sql

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
--
44
-- test the views defined in create.source
55
--
6-
SELECT*from street;
6+
SELECT*FROM street;
77

8-
SELECT*from iexit;
8+
SELECT*FROM iexit
9+
ORDER BY1,2;
910

10-
SELECT*from toyempwhere name='sharon';
11+
SELECT*FROM toyempWHERE name='sharon';
1112

‎src/test/regress/sql/tests

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
boolean
22
char
3-
char16
43
char2
54
char4
65
char8
6+
char16
7+
varchar
78
text
9+
strings
810
int2
911
int4
1012
oid
@@ -56,5 +58,4 @@ btree_index
5658
hash_index
5759
select_views
5860
alter_table
59-
purge
6061
portals_p2

‎src/test/regress/sql/text.sql

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
-- *************testing built-in type text ****************
22

3-
--
4-
-- adt operators in the target list
5-
--
6-
-- fixed-length by reference
7-
SELECT'char 16 string'::char16='char 16 string'::char16AS false;
8-
9-
-- fixed-length by value
10-
SELECT'c'::char='c'::charAS true;
11-
12-
-- variable-length
133
SELECT'this is a text string'::text='this is a text string'::textAS true;
144

155
SELECT'this is a text string'::text='this is a text strin'::textAS false;
166

7+
CREATETABLETEXT_TBL (f1text);
8+
9+
INSERT INTO TEXT_TBLVALUES ('doh!');
10+
INSERT INTO TEXT_TBLVALUES ('hi de ho neighbor');
11+
12+
SELECT''AS two,*FROM TEXT_TBL;
1713

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp