aboutsummaryrefslogtreecommitdiff
path: root/src/test/regress/README
blob: 25a38cf9488e8237fdb267669dc12d08c495bb92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Introduction

  The PostgreSQL regression tests are a comprehensive set of tests for the
  SQL implementation embeded in PostgreSQL developed by Jolly Chen and
  Andrew Yu. It tests standard SQL operations as well as the extensability
  capabilities of PostgreSQL.

Preparation

  The regression test is invoked thru by the 'make' command which compiles
  a 'c' program with PostgreSQL extension functions into a shared library
  in the current directory.  Localized shell scripts are also created in
  the current directory. The 'expected.input' file is massaged into the
  'expected.out' file.  The localization replaces macros in the source
  files with absolute pathnames and user names.

Directory Layout

  input/ .... .source files that are converted using 'make all' into
              .sql files in the 'sql' subdirectory

  output/ ... .source files that are converted using 'make all' into
              .out files in the 'expected' subdirectory

  sql/ ...... .sql files used to perform the regression tests

  expected/ . .out files that represent what we *expect* the results to
              look like

  results/ .. .out files that represent what the results *actually* look
              like

Running the regression test

  If you have prevously invoked the regression test, clean up the
  working directory with:

        make clean

  The regression test is invoked with the command:

        make all runtest

  Normally, the regression test should be run as the pg_superuser as the
  'src/test/regress' directory and sub-directories are owned by the
  pg_superuser. If you run the regression test as another user the
  'src/test/regress' directory should be writeable to that user.

Comparing expected/actual output

  The results are in the file 'regress.out' which can be compared
  with the 'expected.out' file using 'diff'. The files will NOT
  compare exactly. The following paragraphs attempt to explain the
  differences.

OID differences

  There are several places where PostgreSQL OID (object identifiers) appear
  in 'regress.out'. OID's are unique 32-bit integers which are generated
  by the PostgreSQL backend whenever a table row is inserted or updated.
  If you run the regression test on a non-virgin database or run it multiple
  times, the OID's reported will have different values. 

  The following SQL statements in 'regress.out' have shown this behavior:

  QUERY: SELECT user_relns() AS user_relns ORDER BY user_relns;

    The 'a,523676' row is composed from an OID.

TIME differences

  Some of the tests involving date/time functions use the implicit
  time zone in effect at the time the regression test is run. In other
  tests the timezone to be inserted into the regression data base is
  explicitly specified.

  The 'expected.input' file was prepared in the 'US/Pacific' timezone
  so there may be differences where the 'expected.out' file has
  PST/PDT times and the 'regress.out' file has your local timezone.

FLOATING POINT differences

  Some of the tests involve computing 64-bit (FLOAT8) number from table
  columns. Differences in results involving mathematical functions of
  FLOAT8 columns have been observed. These differences occur where
  different operating systems are used on the same platform ie:
  BSDI and SOLARIS on Intel/86, and where the same operating system is
  used used on different platforms, ie: SOLARIS on SPARC and Intel/86.

  Human eyeball comparison is needed to determine the real significance
  of these differences which are usually 10 places to the right of
  the decimal point.

POLYGON differences

  Several of the tests involve operations on geographic date about the
  Oakland/Berkley CA street map. The map data is expressed as polygons
  whose verticies are represened as pairs of FLOAT8 numbers (decimal
  lattitude and longitude). Initially, some tables are created and
  loaded with geographic data, then some views are created which join
  two tables using the polygon intersection operator (##), then a select
  is done on the view. 

  When comparing the results from different platforms, differences occur
  in the 2nd or 3rd place to the right of the decimal point. The SQL
  statements where these problems occur are the folowing:

    QUERY: SELECT * from street;
    QUERY: SELECT * from iexit;

DATE/TIME differences

  The Makefile attempts to adjust for timezone differences, but it is
  totally possible to eliminate them.  People outside North America
  will probabablly find the Makefile's adjustments are incorrect.  Also
  entries that use the time -infinity display with year 1970 plus/minus the
  number of hours you are different from GMT.

--------[ old stuff that needs to be rewritten ]-----

The 'expected.input' file and the 'sample.regress.out' file

  The 'expected.input' file was created on a SPARC Solaris 2.4 system
  using the 'postgres5-1.02a5.tar.gz' source tree. It has been compared
  with a file created on an I386 Solaris 2.4 system and the differences
  are only in the floating point polygons in the 3rd digit to the right
  of the decimal point. (see below)

  The 'sample.regress.out' file is from the postgres-1.01 release
  constructed by Jolly Chen and is included here for reference. It may
  have been created on a DEC ALPHA machine as the 'Makefile.global'
  in the postgres-1.01 release has PORTNAME=alpha.