2
2
Introduction
3
3
4
4
The PostgreSQL regression tests are a comprehensive set of tests for the
5
- SQL implementation embeded in PostgreSQL developed by Jolly Chen and
6
- Andrew Yu. It tests standard SQL operations as well as the extensability
5
+ SQL implementation embedded in PostgreSQL developed by Jolly Chen and
6
+ Andrew Yu. It tests standard SQL operations as well as the extensibility
7
7
capabilities of PostgreSQL.
8
8
9
+ These tests have recently been revised by Marc Fournier and others to
10
+ become current for PostgreSQL v6.1. The tests are now packaged as
11
+ functional units and should be easier to run and easier to interpret.
12
+
13
+ Some properly installed and fully functional PostgreSQL installations
14
+ can fail these regression tests due to artifacts of the genetic optimizer.
15
+ See the v6.1-specific release notes in this document for further details.
16
+
9
17
Preparation
10
18
11
- The regression test is invoked thru by the 'make' command which compiles
19
+ The regression test is invoked by the 'make' command which compiles
12
20
a 'c' program with PostgreSQL extension functions into a shared library
13
21
in the current directory. Localized shell scripts are also created in
14
- the current directory. The 'expected.input' file is massaged into the
15
- ' expected.out' file . The localization replaces macros in the source
22
+ the current directory. The output file templates are massaged into the
23
+ ./ expected/* .out files . The localization replaces macros in the source
16
24
files with absolute pathnames and user names.
17
25
26
+ The postmaster should be invoked with the system time zone set for
27
+ Berkeley, California. On some systems, this can be accomplished by
28
+ setting the TZ environment variable before starting the postmaster
29
+ (for csh/bash; use set/export for some other shells):
30
+
31
+ setenv TZ PST8PDT7,M04.01.0,M10.05.03
32
+ /usr/local/pgsql/bin/postmaster -s
33
+
18
34
Directory Layout
19
35
20
36
input/ .... .source files that are converted using 'make all' into
21
- .sql files in the 'sql' subdirectory
37
+ some of the .sql files in the 'sql' subdirectory
22
38
23
39
output/ ... .source files that are converted using 'make all' into
24
40
.out files in the 'expected' subdirectory
@@ -29,7 +45,7 @@ Directory Layout
29
45
look like
30
46
31
47
results/ .. .out files that represent what the results *actually* look
32
- like
48
+ like. Also used as temporary storage for table copy testing.
33
49
34
50
Running the regression test
35
51
@@ -45,14 +61,14 @@ Running the regression test
45
61
Normally, the regression test should be run as the pg_superuser as the
46
62
'src/test/regress' directory and sub-directories are owned by the
47
63
pg_superuser. If you run the regression test as another user the
48
- 'src/test/regress' directory should be writeable to that user.
64
+ 'src/test/regress' directory tree should be writeable to that user.
49
65
50
66
Comparing expected/actual output
51
67
52
- The results are in the file 'regress.out' which can be compared
53
- with the 'expected.out' file using 'diff'. The files will NOT
54
- compare exactly . The following paragraphs attempt to explain the
55
- differences.
68
+ The results are in the files in the ./results directory. These
69
+ results can be compared with results in the ./expected directory
70
+ using 'diff' . The files might not compare exactly. The following
71
+ paragraphs attempt to explain the differences.
56
72
57
73
OID differences
58
74
@@ -62,7 +78,7 @@ OID differences
62
78
If you run the regression test on a non-virgin database or run it multiple
63
79
times, the OID's reported will have different values.
64
80
65
- The following SQL statements in 'regress .out' have shown this behavior:
81
+ The following SQL statements in 'misc .out' have shown this behavior:
66
82
67
83
QUERY: SELECT user_relns() AS user_relns ORDER BY user_relns;
68
84
@@ -96,8 +112,8 @@ POLYGON differences
96
112
97
113
Several of the tests involve operations on geographic date about the
98
114
Oakland/Berkley CA street map. The map data is expressed as polygons
99
- whose verticies are represened as pairs of FLOAT8 numbers (decimal
100
- lattitude and longitude). Initially, some tables are created and
115
+ whose vertices are represented as pairs of FLOAT8 numbers (decimal
116
+ latitude and longitude). Initially, some tables are created and
101
117
loaded with geographic data, then some views are created which join
102
118
two tables using the polygon intersection operator (##), then a select
103
119
is done on the view.
@@ -111,24 +127,84 @@ POLYGON differences
111
127
112
128
DATE/TIME differences
113
129
130
+ On many supported platforms, you can force PostgreSQL to believe that it
131
+ is running in the same time zone as Berkeley, California. See details in
132
+ the section on how to run the regression tests.
133
+
114
134
The Makefile attempts to adjust for timezone differences, but it is
115
- totally possible to eliminate them. People outside North America
135
+ not possible to totally eliminate them. People outside North America
116
136
will probabablly find the Makefile's adjustments are incorrect. Also
117
137
entries that use the time -infinity display with year 1970 plus/minus the
118
138
number of hours you are different from GMT.
119
139
120
- --------[ old stuff that needs to be rewritten ]-----
140
+ Random differences
141
+
142
+ There is at least one test case in misc.out which is intended to produce
143
+ random results. This causes misc to fail the regression testing.
144
+ Typing "diff results/misc.out expected/misc.out" should produce only
145
+ one or a few lines of differences for this reason, but other floating
146
+ point differences on dissimilar architectures might cause many more
147
+ differences.
121
148
122
- The 'expected.input' file and the 'sample.regress.out' file
149
+ The 'expected' files
123
150
124
- The 'expected.input' file was created on a SPARC Solaris 2.4 system
125
- using the 'postgres5-1.02a5.tar.gz' source tree. It has been compared
151
+ The ./expected/*.out files were adapted from the original monolithic
152
+ 'expected.input' file provided by Jolly Chen et al. Newer versions of these
153
+ files generated on various development machines have been substituted after
154
+ careful (?) inspection. Many of the development machines are running a
155
+ Unix OS variant (FreeBSD, Linux, etc) on Ix86 hardware.
156
+
157
+ The original 'expected.input' file was created on a SPARC Solaris 2.4
158
+ system using the 'postgres5-1.02a5.tar.gz' source tree. It was compared
126
159
with a file created on an I386 Solaris 2.4 system and the differences
127
- are only in the floating point polygons in the 3rd digit to the right
160
+ were only in the floating point polygons in the 3rd digit to the right
128
161
of the decimal point. (see below)
129
162
130
- The 'sample.regress.out' file is from the postgres-1.01 release
163
+ The original 'sample.regress.out' file was from the postgres-1.01 release
131
164
constructed by Jolly Chen and is included here for reference. It may
132
165
have been created on a DEC ALPHA machine as the 'Makefile.global'
133
166
in the postgres-1.01 release has PORTNAME=alpha.
134
167
168
+ Current release notes
169
+
170
+ There are no release notes for PostgreSQL v6.0.
171
+
172
+ v6.1beta release notes
173
+
174
+ The regression tests have been adapted and extensively modified for the
175
+ v6.1 release of PostgreSQL.
176
+
177
+ Three new data types (datetime, timespan, and circle) have been added to
178
+ the native set of PostgreSQL types. Points, boxes, paths, and polygons
179
+ have had their output formats improved, but the old-style input formats
180
+ are accepted by v6.1. The source data files have not been updated to the
181
+ new formats, but should be for the next release. The polygon output in
182
+ misc.out has only been spot-checked for correctness relative to the
183
+ original regression output.
184
+
185
+ To get consistant results from the regression tests, compile the PostgreSQL
186
+ backend with the genetic optimizer (GEQ) turned off. The genetic algorithms
187
+ introduce a random behavior in the output ordering which causes the
188
+ simple "diff" implementation of the tests to fail. To turn off the genetic
189
+ optimizer, edit the src/include/config.h file and comment-out the line
190
+ containing "#define GEQ", then do a "make clean install" to regenerate
191
+ the backend. Existing v6.1 databases are not affected by the choice of
192
+ optimizer, so there is no need to reload after changing the optimizer.
193
+ The new genetic optimizer has very nice performance with many-table joins,
194
+ so you may want to make sure to re-enable it and reinstall the code after
195
+ you have concluded your regression testing.
196
+
197
+ XXX update this for the production release - tgl 97/04/26
198
+ The interpretation of array specifiers (the curly braces around atomic
199
+ values) appears to have changed sometime after the original regression
200
+ tests were generated. The current ./expected/*.out files reflect this
201
+ new interpretation, which may not be correct!
202
+
203
+ XXX update this for the production release - tgl 97/04/26
204
+ The float8 regression test fails. This may be due to the parser continuing
205
+ rather than aborting when given invalid constants for input values.
206
+
207
+ XXX update this for the production release - tgl 97/04/26
208
+ Regression tests involving indexed tables fail in at least some environments.
209
+ This may indicate a problem with the current index code.
210
+
0 commit comments