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
9c9e2dd4
Commit
9c9e2dd4
authored
Apr 05, 1997
by
Marc G. Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More splits of the regression tests in order to make them more
user-friendly (and more useful)
parent
aa51d0d1
Changes
13
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
5231 additions
and
5 deletions
+5231
-5
src/test/regress/GNUmakefile
src/test/regress/GNUmakefile
+3
-1
src/test/regress/expected/create_table.out
src/test/regress/expected/create_table.out
+167
-0
src/test/regress/expected/create_type.out
src/test/regress/expected/create_type.out
+12
-0
src/test/regress/input/Makefile
src/test/regress/input/Makefile
+35
-0
src/test/regress/input/create_function.source
src/test/regress/input/create_function.source
+74
-0
src/test/regress/input/create_misc.source
src/test/regress/input/create_misc.source
+451
-0
src/test/regress/output/Makefile
src/test/regress/output/Makefile
+39
-0
src/test/regress/output/create_function.source
src/test/regress/output/create_function.source
+49
-0
src/test/regress/output/create_misc.source
src/test/regress/output/create_misc.source
+4143
-0
src/test/regress/regress.sh
src/test/regress/regress.sh
+4
-4
src/test/regress/sql/create_table.sql
src/test/regress/sql/create_table.sql
+231
-0
src/test/regress/sql/create_type.sql
src/test/regress/sql/create_type.sql
+19
-0
src/test/regress/sql/tests
src/test/regress/sql/tests
+4
-0
No files found.
src/test/regress/GNUmakefile
View file @
9c9e2dd4
...
...
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.
1 1997/01/21 01:27:18 momjian
Exp $
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.
2 1997/04/05 21:24:06 scrappy
Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -45,6 +45,8 @@ OUTFILES= stud_emp.data onek.data regress.out aportal.out
# prepare to run the test (including clean-up after the last run)
#
all
:
$(INFILES)
cd
input
;
gmake all
;
cd
..
cd
output
;
gmake all
;
cd
..
rm
-f
$(OUTFILES)
#
...
...
src/test/regress/expected/create_table.out
0 → 100644
View file @
9c9e2dd4
QUERY: CREATE TABLE hobbies_r (
name text,
person text
);
QUERY: CREATE TABLE equipment_r (
name text,
hobby text
);
QUERY: CREATE TABLE onek (
unique1 int4,
unique2 int4,
two int4,
four int4,
ten int4,
twenty int4,
hundred int4,
thousand int4,
twothousand int4,
fivethous int4,
tenthous int4,
odd int4,
even int4,
stringu1 char16,
stringu2 char16,
string4 char16
);
QUERY: CREATE TABLE tenk1 (
unique1 int4,
unique2 int4,
two int4,
four int4,
ten int4,
twenty int4,
hundred int4,
thousand int4,
twothousand int4,
fivethous int4,
tenthous int4,
odd int4,
even int4,
stringu1 char16,
stringu2 char16,
string4 char16
);
QUERY: CREATE TABLE tenk2 (
unique1 int4,
unique2 int4,
two int4,
four int4,
ten int4,
twenty int4,
hundred int4,
thousand int4,
twothousand int4,
fivethous int4,
tenthous int4,
odd int4,
even int4,
stringu1 char16,
stringu2 char16,
string4 char16
);
QUERY: CREATE TABLE person (
name text,
age int4,
location point
);
QUERY: CREATE TABLE emp (
salary int4,
manager char16
) INHERITS (person);
QUERY: CREATE TABLE student (
gpa float8
) INHERITS (person);
QUERY: CREATE TABLE stud_emp (
percent int4
) INHERITS (emp, student);
QUERY: CREATE TABLE city (
name char16,
location box,
budget city_budget
);
QUERY: CREATE TABLE dept (
dname char16,
mgrname text
);
QUERY: CREATE TABLE slow_emp4000 (
home_base box
);
QUERY: CREATE TABLE fast_emp4000 (
home_base box
);
QUERY: CREATE TABLE road (
name text,
thepath path
);
QUERY: CREATE TABLE ihighway () INHERITS (road);
QUERY: CREATE TABLE shighway (
surface text
) INHERITS (road);
QUERY: CREATE TABLE real_city (
pop int4,
cname text,
outline path
);
QUERY: CREATE TABLE a_star (
class char,
a int4
);
QUERY: CREATE TABLE b_star (
b text
) INHERITS (a_star);
QUERY: CREATE TABLE c_star (
c char16
) INHERITS (a_star);
QUERY: CREATE TABLE d_star (
d float8
) INHERITS (b_star, c_star);
QUERY: CREATE TABLE e_star (
e int2
) INHERITS (c_star);
QUERY: CREATE TABLE f_star (
f polygon
) INHERITS (e_star);
QUERY: CREATE TABLE aggtest (
a int2,
b float4
);
QUERY: CREATE TABLE arrtest (
a int2[],
b int4[][][],
c char16[],
d text[][],
e float8[]
);
QUERY: CREATE TABLE hash_i4_heap (
seqno int4,
random int4
);
QUERY: CREATE TABLE hash_c16_heap (
seqno int4,
random char16
);
QUERY: CREATE TABLE hash_txt_heap (
seqno int4,
random text
);
QUERY: CREATE TABLE hash_f8_heap (
seqno int4,
random float8
);
QUERY: CREATE TABLE bt_i4_heap (
seqno int4,
random int4
);
QUERY: CREATE TABLE bt_c16_heap (
seqno char16,
random int4
);
QUERY: CREATE TABLE bt_txt_heap (
seqno text,
random int4
);
QUERY: CREATE TABLE bt_f8_heap (
seqno float8,
random int4
);
src/test/regress/expected/create_type.out
0 → 100644
View file @
9c9e2dd4
QUERY: CREATE TYPE circle (
internallength = 24,
input = circle_in,
output = circle_out,
alignment = double
);
QUERY: CREATE TYPE city_budget (
internallength = 16,
input = int44in,
output = int44out,
element = int4
);
src/test/regress/input/Makefile
0 → 100644
View file @
9c9e2dd4
#-------------------------------------------------------------------------
#
# Makefile--
# Makefile for regress (the regression test)
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/test/regress/input/Attic/Makefile,v 1.1 1997/04/05 21:24:38 scrappy Exp $
#
#-------------------------------------------------------------------------
SRCDIR
=
../../..
include
../../../Makefile.global
#
# ... plus test query inputs
#
# INFILES is the files the regression test uses for input.
INFILES
=
create_misc.sql
\
create_function.sql
all
:
$(INFILES)
%.sql
:
%.source
if
[
-z
"
$$
USER"
]
;
then
USER
=
$$
LOGNAME
;
fi
;
\
if
[
-z
"
$$
USER"
]
;
then
USER
=
`
whoami
`
;
fi
;
\
if
[
-z
"
$$
USER"
]
;
then
echo
'Cannot deduce $$USER.'
;
exit
1
;
fi
;
\
rm
-f
$@
;
\
C
=
`
pwd
`
;
\
sed
-e
"s:_CWD_:
$(PWD)
:g"
\
-e
"s:_OBJWD_:
$(PWD)
:g"
\
-e
"s:_DLSUFFIX_:
$(DLSUFFIX)
:g"
\
-e
"s/_USER_/
$$
USER/g"
<
$<
>
../sql/
$@
src/test/regress/input/create_function.source
0 → 100644
View file @
9c9e2dd4
--
-- create.source
--
--
CREATE FUNCTION circle_in(opaque)
RETURNS circle
AS '_OBJWD_/regress_DLSUFFIX_'
LANGUAGE 'c';
CREATE FUNCTION circle_out(opaque)
RETURNS opaque
AS '_OBJWD_/regress_DLSUFFIX_'
LANGUAGE 'c';
--
-- FUNCTION DEFINITIONS
--
CREATE FUNCTION hobbies(person)
RETURNS setof hobbies_r
AS 'select * from hobbies_r where person = $1.name'
LANGUAGE 'sql';
CREATE FUNCTION hobby_construct(text, text)
RETURNS hobbies_r
AS 'select $1 as name, $2 as hobby'
LANGUAGE 'sql';
CREATE FUNCTION equipment(hobbies_r)
RETURNS setof equipment_r
AS 'select * from equipment_r where hobby = $1.name'
LANGUAGE 'sql';
CREATE FUNCTION user_relns()
RETURNS setof name
AS 'select relname
from pg_class
where relname !~ ''pg_.*'' and
relkind <> ''i'' '
LANGUAGE 'sql';
CREATE FUNCTION pt_in_circle(point, circle)
RETURNS int4
AS '_OBJWD_/regress_DLSUFFIX_'
LANGUAGE 'c';
CREATE FUNCTION overpaid(emp)
RETURNS bool
AS '_OBJWD_/regress_DLSUFFIX_'
LANGUAGE 'c';
CREATE FUNCTION boxarea(box)
RETURNS int4
AS '_OBJWD_/regress_DLSUFFIX_'
LANGUAGE 'c';
CREATE FUNCTION interpt_pp(path, path)
RETURNS point
AS '_OBJWD_/regress_DLSUFFIX_'
LANGUAGE 'c';
CREATE FUNCTION reverse_c16(char16)
RETURNS char16
AS '_OBJWD_/regress_DLSUFFIX_'
LANGUAGE 'c';
--
-- FUNCTION DYNAMIC LOADING
--
LOAD '_OBJWD_/regress_DLSUFFIX_';
src/test/regress/input/create_misc.source
0 → 100644
View file @
9c9e2dd4
This diff is collapsed.
Click to expand it.
src/test/regress/output/Makefile
0 → 100644
View file @
9c9e2dd4
#-------------------------------------------------------------------------
#
# Makefile--
# Makefile for regress (the regression test)
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/test/regress/output/Attic/Makefile,v 1.1 1997/04/05 21:25:02 scrappy Exp $
#
#-------------------------------------------------------------------------
SRCDIR
=
../../..
include
../../../Makefile.global
#
# ... plus test query inputs
#
# INFILES is the files the regression test uses for input.
INFILES
=
create_misc.out
\
create_function.out
all
:
$(INFILES)
%.out
:
%.source
if
[
-z
"
$$
USER"
]
;
then
USER
=
$$
LOGNAME
;
fi
;
\
if
[
-z
"
$$
USER"
]
;
then
USER
=
`
whoami
`
;
fi
;
\
if
[
-z
"
$$
USER"
]
;
then
echo
'Cannot deduce $USER.'
;
exit
1
;
fi
;
\
rm
-f
expected.out
;
\
MYTZ
=
`
date
|
cut
-c21
`
;
\
C
=
"
`
pwd
`
"
;
\
sed
-e
"s:_CWD_:
$(PWD)
:g"
\
-e
"s:_OBJWD_:
$(PWD)
:g"
\
-e
"s:_DLSUFFIX_:
$(DLSUFFIX)
:g"
\
-e
"s;
\(
[A-Z][a-z][a-z][^ ]* [A-Z][a-z][a-z] [0-9 ][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9][0-9][0-9][0-9]
\)
[A-Z]
\(
[A-Z][A-Z]
\)
;
\1
$$
MYTZ
\2
;g"
\
-e
"s;
\(
[A-Z][a-z][a-z][^ ]* [A-Z][a-z][a-z] [0-9 ][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]
\)
[A-Z]
\(
[A-Z][A-Z] [0-9][0-9][0-9][0-9]
\)
;
\1
$$
MYTZ
\2
;g"
\
-e
"s:_USER_:
$$
USER:g"
<
$<
>
../expected/
$@
@
echo
"YOUR EXPECTED RESULTS ARE NOW IN FILE expected.out."
src/test/regress/output/create_function.source
0 → 100644
View file @
9c9e2dd4
QUERY: CREATE FUNCTION circle_in(opaque)
RETURNS circle
AS '_CWD_/regress_DLSUFFIX_'
LANGUAGE 'c';
NOTICE:ProcedureCreate: type 'circle' is not yet defined
QUERY: CREATE FUNCTION circle_out(opaque)
RETURNS opaque
AS '_CWD_/regress_DLSUFFIX_'
LANGUAGE 'c';
QUERY: CREATE FUNCTION hobbies(person)
RETURNS setof hobbies_r
AS 'select * from hobbies_r where person = $1.name'
LANGUAGE 'sql';
QUERY: CREATE FUNCTION hobby_construct(text, text)
RETURNS hobbies_r
AS 'select $1 as name, $2 as hobby'
LANGUAGE 'sql';
QUERY: CREATE FUNCTION equipment(hobbies_r)
RETURNS setof equipment_r
AS 'select * from equipment_r where hobby = $1.name'
LANGUAGE 'sql';
QUERY: CREATE FUNCTION user_relns()
RETURNS setof name
AS 'select relname
from pg_class
where relname !~ ''pg_.*'' and
relkind <> ''i'' '
LANGUAGE 'sql';
QUERY: CREATE FUNCTION pt_in_circle(point, circle)
RETURNS int4
AS '_CWD_/regress_DLSUFFIX_'
LANGUAGE 'c';
QUERY: CREATE FUNCTION overpaid(emp)
RETURNS bool
AS '_CWD_/regress_DLSUFFIX_'
LANGUAGE 'c';
QUERY: CREATE FUNCTION boxarea(box)
RETURNS int4
AS '_CWD_/regress_DLSUFFIX_'
LANGUAGE 'c';
QUERY: CREATE FUNCTION interpt_pp(path, path)
RETURNS point
AS '_CWD_/regress_DLSUFFIX_'
LANGUAGE 'c';
QUERY: CREATE FUNCTION reverse_c16(char16)
RETURNS char16
AS '_CWD_/regress_DLSUFFIX_'
LANGUAGE 'c';
QUERY: LOAD '_CWD_/regress_DLSUFFIX_';
src/test/regress/output/create_misc.source
0 → 100644
View file @
9c9e2dd4
This diff is collapsed.
Click to expand it.
src/test/regress/regress.sh
View file @
9c9e2dd4
#!/bin/sh
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.
4 1997/04/05 11:58:35
scrappy Exp $
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.
5 1997/04/05 21:24:11
scrappy Exp $
#
if
[
-d
./obj
]
;
then
cd
./obj
...
...
@@ -29,9 +29,9 @@ fi
echo
===============
running regression queries ...
=================
for
i
in
`
cat
sql/tests
`
do
echo
-n
${
i
}
..
$FRONTEND
regression < sql/
${
i
}
.sql
2>&1 |
tee
output/
${
i
}
.out
if
[
`
diff expected/
${
i
}
.out
output
/
${
i
}
.out |
wc
-l
`
-ne
0
]
echo
-n
"
${
i
}
.. "
$FRONTEND
regression < sql/
${
i
}
.sql
>
results/
${
i
}
.out 2>&1
if
[
`
diff expected/
${
i
}
.out
results
/
${
i
}
.out |
wc
-l
`
-ne
0
]
then
echo
failed
else
...
...
src/test/regress/sql/create_table.sql
0 → 100644
View file @
9c9e2dd4
--
-- create.source
--
--
--
-- CLASS DEFINITIONS
--
CREATE
TABLE
hobbies_r
(
name
text
,
person
text
);
CREATE
TABLE
equipment_r
(
name
text
,
hobby
text
);
CREATE
TABLE
onek
(
unique1
int4
,
unique2
int4
,
two
int4
,
four
int4
,
ten
int4
,
twenty
int4
,
hundred
int4
,
thousand
int4
,
twothousand
int4
,
fivethous
int4
,
tenthous
int4
,
odd
int4
,
even
int4
,
stringu1
char16
,
stringu2
char16
,
string4
char16
);
CREATE
TABLE
tenk1
(
unique1
int4
,
unique2
int4
,
two
int4
,
four
int4
,
ten
int4
,
twenty
int4
,
hundred
int4
,
thousand
int4
,
twothousand
int4
,
fivethous
int4
,
tenthous
int4
,
odd
int4
,
even
int4
,
stringu1
char16
,
stringu2
char16
,
string4
char16
);
CREATE
TABLE
tenk2
(
unique1
int4
,
unique2
int4
,
two
int4
,
four
int4
,
ten
int4
,
twenty
int4
,
hundred
int4
,
thousand
int4
,
twothousand
int4
,
fivethous
int4
,
tenthous
int4
,
odd
int4
,
even
int4
,
stringu1
char16
,
stringu2
char16
,
string4
char16
);
CREATE
TABLE
person
(
name
text
,
age
int4
,
location
point
);
CREATE
TABLE
emp
(
salary
int4
,
manager
char16
)
INHERITS
(
person
);
CREATE
TABLE
student
(
gpa
float8
)
INHERITS
(
person
);
CREATE
TABLE
stud_emp
(
percent
int4
)
INHERITS
(
emp
,
student
);
CREATE
TABLE
city
(
name
char16
,
location
box
,
budget
city_budget
);
CREATE
TABLE
dept
(
dname
char16
,
mgrname
text
);
CREATE
TABLE
slow_emp4000
(
home_base
box
);
CREATE
TABLE
fast_emp4000
(
home_base
box
);
CREATE
TABLE
road
(
name
text
,
thepath
path
);
CREATE
TABLE
ihighway
()
INHERITS
(
road
);
CREATE
TABLE
shighway
(
surface
text
)
INHERITS
(
road
);
CREATE
TABLE
real_city
(
pop
int4
,
cname
text
,
outline
path
);
--
-- test the "star" operators a bit more thoroughly -- this time,
-- throw in lots of NULL fields...
--
-- a is the type root
-- b and c inherit from a (one-level single inheritance)
-- d inherits from b and c (two-level multiple inheritance)
-- e inherits from c (two-level single inheritance)
-- f inherits from e (three-level single inheritance)
--
CREATE
TABLE
a_star
(
class
char
,
a
int4
);
CREATE
TABLE
b_star
(
b
text
)
INHERITS
(
a_star
);
CREATE
TABLE
c_star
(
c
char16
)
INHERITS
(
a_star
);
CREATE
TABLE
d_star
(
d
float8
)
INHERITS
(
b_star
,
c_star
);
CREATE
TABLE
e_star
(
e
int2
)
INHERITS
(
c_star
);
CREATE
TABLE
f_star
(
f
polygon
)
INHERITS
(
e_star
);
CREATE
TABLE
aggtest
(
a
int2
,
b
float4
);
CREATE
TABLE
arrtest
(
a
int2
[],
b
int4
[][][],
c
char16
[],
d
text
[][],
e
float8
[]
);
CREATE
TABLE
hash_i4_heap
(
seqno
int4
,
random
int4
);
CREATE
TABLE
hash_c16_heap
(
seqno
int4
,
random
char16
);
CREATE
TABLE
hash_txt_heap
(
seqno
int4
,
random
text
);
CREATE
TABLE
hash_f8_heap
(
seqno
int4
,
random
float8
);
-- don't include the hash_ovfl_heap stuff in the distribution
-- the data set is too large for what it's worth
--
-- CREATE TABLE hash_ovfl_heap (
-- x int4,
-- y int4
-- );
CREATE
TABLE
bt_i4_heap
(
seqno
int4
,
random
int4
);
CREATE
TABLE
bt_c16_heap
(
seqno
char16
,
random
int4
);
CREATE
TABLE
bt_txt_heap
(
seqno
text
,
random
int4
);
CREATE
TABLE
bt_f8_heap
(
seqno
float8
,
random
int4
);
src/test/regress/sql/create_type.sql
0 → 100644
View file @
9c9e2dd4
--
-- create.source
--
--
CREATE
TYPE
circle
(
internallength
=
24
,
input
=
circle_in
,
output
=
circle_out
,
alignment
=
double
);
CREATE
TYPE
city_budget
(
internallength
=
16
,
input
=
int44in
,
output
=
int44out
,
element
=
int4
);
src/test/regress/sql/tests
View file @
9c9e2dd4
create_function
create_type
create_table
create_misc
reltime
abstime
boolean
...
...
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