Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9c9e2dd

Browse files
committed
More splits of the regression tests in order to make them more
user-friendly (and more useful)
1 parent aa51d0d commit 9c9e2dd

13 files changed

+5231
-5
lines changed

src/test/regress/GNUmakefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.1 1997/01/21 01:27:18 momjian Exp $
10+
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.2 1997/04/05 21:24:06 scrappy Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -45,6 +45,8 @@ OUTFILES= stud_emp.data onek.data regress.out aportal.out
4545
# prepare to run the test (including clean-up after the last run)
4646
#
4747
all: $(INFILES)
48+
cd input; gmake all; cd ..
49+
cd output; gmake all; cd ..
4850
rm -f $(OUTFILES)
4951

5052
#
+167
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
QUERY: CREATE TABLE hobbies_r (
2+
name text,
3+
person text
4+
);
5+
QUERY: CREATE TABLE equipment_r (
6+
name text,
7+
hobby text
8+
);
9+
QUERY: CREATE TABLE onek (
10+
unique1 int4,
11+
unique2 int4,
12+
two int4,
13+
four int4,
14+
ten int4,
15+
twenty int4,
16+
hundred int4,
17+
thousand int4,
18+
twothousand int4,
19+
fivethous int4,
20+
tenthous int4,
21+
odd int4,
22+
even int4,
23+
stringu1 char16,
24+
stringu2 char16,
25+
string4 char16
26+
);
27+
QUERY: CREATE TABLE tenk1 (
28+
unique1 int4,
29+
unique2 int4,
30+
two int4,
31+
four int4,
32+
ten int4,
33+
twenty int4,
34+
hundred int4,
35+
thousand int4,
36+
twothousand int4,
37+
fivethous int4,
38+
tenthous int4,
39+
odd int4,
40+
even int4,
41+
stringu1 char16,
42+
stringu2 char16,
43+
string4 char16
44+
);
45+
QUERY: CREATE TABLE tenk2 (
46+
unique1 int4,
47+
unique2 int4,
48+
two int4,
49+
four int4,
50+
ten int4,
51+
twenty int4,
52+
hundred int4,
53+
thousand int4,
54+
twothousand int4,
55+
fivethous int4,
56+
tenthous int4,
57+
odd int4,
58+
even int4,
59+
stringu1 char16,
60+
stringu2 char16,
61+
string4 char16
62+
);
63+
QUERY: CREATE TABLE person (
64+
name text,
65+
age int4,
66+
location point
67+
);
68+
QUERY: CREATE TABLE emp (
69+
salary int4,
70+
manager char16
71+
) INHERITS (person);
72+
QUERY: CREATE TABLE student (
73+
gpa float8
74+
) INHERITS (person);
75+
QUERY: CREATE TABLE stud_emp (
76+
percent int4
77+
) INHERITS (emp, student);
78+
QUERY: CREATE TABLE city (
79+
name char16,
80+
location box,
81+
budget city_budget
82+
);
83+
QUERY: CREATE TABLE dept (
84+
dname char16,
85+
mgrname text
86+
);
87+
QUERY: CREATE TABLE slow_emp4000 (
88+
home_base box
89+
);
90+
QUERY: CREATE TABLE fast_emp4000 (
91+
home_base box
92+
);
93+
QUERY: CREATE TABLE road (
94+
name text,
95+
thepath path
96+
);
97+
QUERY: CREATE TABLE ihighway () INHERITS (road);
98+
QUERY: CREATE TABLE shighway (
99+
surface text
100+
) INHERITS (road);
101+
QUERY: CREATE TABLE real_city (
102+
pop int4,
103+
cname text,
104+
outline path
105+
);
106+
QUERY: CREATE TABLE a_star (
107+
class char,
108+
a int4
109+
);
110+
QUERY: CREATE TABLE b_star (
111+
b text
112+
) INHERITS (a_star);
113+
QUERY: CREATE TABLE c_star (
114+
c char16
115+
) INHERITS (a_star);
116+
QUERY: CREATE TABLE d_star (
117+
d float8
118+
) INHERITS (b_star, c_star);
119+
QUERY: CREATE TABLE e_star (
120+
e int2
121+
) INHERITS (c_star);
122+
QUERY: CREATE TABLE f_star (
123+
f polygon
124+
) INHERITS (e_star);
125+
QUERY: CREATE TABLE aggtest (
126+
a int2,
127+
b float4
128+
);
129+
QUERY: CREATE TABLE arrtest (
130+
a int2[],
131+
b int4[][][],
132+
c char16[],
133+
d text[][],
134+
e float8[]
135+
);
136+
QUERY: CREATE TABLE hash_i4_heap (
137+
seqno int4,
138+
random int4
139+
);
140+
QUERY: CREATE TABLE hash_c16_heap (
141+
seqno int4,
142+
random char16
143+
);
144+
QUERY: CREATE TABLE hash_txt_heap (
145+
seqno int4,
146+
random text
147+
);
148+
QUERY: CREATE TABLE hash_f8_heap (
149+
seqno int4,
150+
random float8
151+
);
152+
QUERY: CREATE TABLE bt_i4_heap (
153+
seqno int4,
154+
random int4
155+
);
156+
QUERY: CREATE TABLE bt_c16_heap (
157+
seqno char16,
158+
random int4
159+
);
160+
QUERY: CREATE TABLE bt_txt_heap (
161+
seqno text,
162+
random int4
163+
);
164+
QUERY: CREATE TABLE bt_f8_heap (
165+
seqno float8,
166+
random int4
167+
);
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
QUERY: CREATE TYPE circle (
2+
internallength = 24,
3+
input = circle_in,
4+
output = circle_out,
5+
alignment = double
6+
);
7+
QUERY: CREATE TYPE city_budget (
8+
internallength = 16,
9+
input = int44in,
10+
output = int44out,
11+
element = int4
12+
);

src/test/regress/input/Makefile

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#-------------------------------------------------------------------------
2+
#
3+
# Makefile--
4+
# Makefile for regress (the regression test)
5+
#
6+
# Copyright (c) 1994, Regents of the University of California
7+
#
8+
#
9+
# IDENTIFICATION
10+
# $Header: /cvsroot/pgsql/src/test/regress/input/Attic/Makefile,v 1.1 1997/04/05 21:24:38 scrappy Exp $
11+
#
12+
#-------------------------------------------------------------------------
13+
14+
SRCDIR= ../../..
15+
include ../../../Makefile.global
16+
17+
#
18+
# ... plus test query inputs
19+
#
20+
# INFILES is the files the regression test uses for input.
21+
INFILES= create_misc.sql \
22+
create_function.sql
23+
24+
all: $(INFILES)
25+
26+
%.sql: %.source
27+
if [ -z "$$USER" ]; then USER=$$LOGNAME; fi; \
28+
if [ -z "$$USER" ]; then USER=`whoami`; fi; \
29+
if [ -z "$$USER" ]; then echo 'Cannot deduce $$USER.'; exit 1; fi; \
30+
rm -f $@; \
31+
C=`pwd`; \
32+
sed -e "s:_CWD_:$(PWD):g" \
33+
-e "s:_OBJWD_:$(PWD):g" \
34+
-e "s:_DLSUFFIX_:$(DLSUFFIX):g" \
35+
-e "s/_USER_/$$USER/g" < $< > ../sql/$@
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
--
2+
-- create.source
3+
--
4+
--
5+
6+
CREATE FUNCTION circle_in(opaque)
7+
RETURNS circle
8+
AS '_OBJWD_/regress_DLSUFFIX_'
9+
LANGUAGE 'c';
10+
11+
CREATE FUNCTION circle_out(opaque)
12+
RETURNS opaque
13+
AS '_OBJWD_/regress_DLSUFFIX_'
14+
LANGUAGE 'c';
15+
16+
--
17+
-- FUNCTION DEFINITIONS
18+
--
19+
CREATE FUNCTION hobbies(person)
20+
RETURNS setof hobbies_r
21+
AS 'select * from hobbies_r where person = $1.name'
22+
LANGUAGE 'sql';
23+
24+
25+
CREATE FUNCTION hobby_construct(text, text)
26+
RETURNS hobbies_r
27+
AS 'select $1 as name, $2 as hobby'
28+
LANGUAGE 'sql';
29+
30+
31+
CREATE FUNCTION equipment(hobbies_r)
32+
RETURNS setof equipment_r
33+
AS 'select * from equipment_r where hobby = $1.name'
34+
LANGUAGE 'sql';
35+
36+
37+
CREATE FUNCTION user_relns()
38+
RETURNS setof name
39+
AS 'select relname
40+
from pg_class
41+
where relname !~ ''pg_.*'' and
42+
relkind <> ''i'' '
43+
LANGUAGE 'sql';
44+
45+
CREATE FUNCTION pt_in_circle(point, circle)
46+
RETURNS int4
47+
AS '_OBJWD_/regress_DLSUFFIX_'
48+
LANGUAGE 'c';
49+
50+
CREATE FUNCTION overpaid(emp)
51+
RETURNS bool
52+
AS '_OBJWD_/regress_DLSUFFIX_'
53+
LANGUAGE 'c';
54+
55+
CREATE FUNCTION boxarea(box)
56+
RETURNS int4
57+
AS '_OBJWD_/regress_DLSUFFIX_'
58+
LANGUAGE 'c';
59+
60+
CREATE FUNCTION interpt_pp(path, path)
61+
RETURNS point
62+
AS '_OBJWD_/regress_DLSUFFIX_'
63+
LANGUAGE 'c';
64+
65+
CREATE FUNCTION reverse_c16(char16)
66+
RETURNS char16
67+
AS '_OBJWD_/regress_DLSUFFIX_'
68+
LANGUAGE 'c';
69+
70+
--
71+
-- FUNCTION DYNAMIC LOADING
72+
--
73+
LOAD '_OBJWD_/regress_DLSUFFIX_';
74+

0 commit comments

Comments
 (0)