head	1.22;
access;
symbols
	REL7_4_29:1.19.8.1
	REL8_0_25:1.20
	REL8_1_21:1.21
	REL7_4_28:1.19.8.1
	REL8_0_24:1.20
	REL8_1_20:1.21
	REL7_4_27:1.19.8.1
	REL8_0_23:1.20
	REL8_1_19:1.21
	REL7_4_26:1.19.8.1
	REL8_0_22:1.20
	REL8_1_18:1.21
	REL7_4_25:1.19.8.1
	REL8_0_21:1.20
	REL8_1_17:1.21
	REL7_4_24:1.19.8.1
	REL8_0_20:1.20
	REL8_1_16:1.21
	REL7_4_23:1.19.8.1
	REL8_0_19:1.20
	REL8_1_15:1.21
	REL7_4_22:1.19.8.1
	REL8_0_18:1.20
	REL8_1_14:1.21
	REL7_4_21:1.19.8.1
	REL8_0_17:1.20
	REL8_1_13:1.21
	REL7_4_20:1.19.8.1
	REL8_0_16:1.20
	REL8_1_12:1.21
	REL7_3_21:1.19
	REL7_4_19:1.19.8.1
	REL8_0_15:1.20
	REL8_1_11:1.21
	REL7_3_20:1.19
	REL7_4_18:1.19.8.1
	REL8_0_14:1.20
	REL8_1_10:1.21
	REL7_3_19:1.19
	REL7_4_17:1.19.8.1
	REL8_0_13:1.20
	REL8_1_9:1.21
	REL8_0_12:1.20
	REL8_1_8:1.21
	REL7_3_18:1.19
	REL7_4_16:1.19.8.1
	REL8_0_11:1.20
	REL8_1_7:1.21
	REL8_0_10:1.20
	REL8_1_6:1.21
	REL7_4_15:1.19.8.1
	REL7_3_17:1.19
	REL8_1_5:1.21
	REL8_0_9:1.20
	REL7_4_14:1.19.8.1
	REL7_3_16:1.19
	REL7_3_15:1.19
	REL7_4_13:1.19.8.1
	REL8_0_8:1.20
	REL8_1_4:1.21
	REL7_3_14:1.19
	REL7_4_12:1.19.8.1
	REL8_0_7:1.20
	REL8_1_3:1.21
	REL7_3_13:1.19
	REL7_4_11:1.19.8.1
	REL8_0_6:1.20
	REL8_1_2:1.21
	REL7_3_12:1.19
	REL7_4_10:1.19.8.1
	REL8_0_5:1.20
	REL8_1_1:1.21
	REL8_1_STABLE:1.21.0.2
	REL8_1_0:1.21
	REL8_1_0RC1:1.21
	REL8_1_0BETA4:1.21
	REL8_1_0BETA3:1.21
	REL7_3_11:1.19
	REL7_4_9:1.19.8.1
	REL8_0_4:1.20
	REL8_1_0BETA2:1.21
	REL8_1_0BETA1:1.21
	REL7_2_8:1.19
	REL7_3_10:1.19
	REL7_4_8:1.19.8.1
	REL8_0_3:1.20
	REL8_0_2:1.20
	REL7_2_7:1.19
	REL7_3_9:1.19
	REL7_4_7:1.19.8.1
	REL8_0_1:1.20
	REL8_0_STABLE:1.20.0.4
	REL8_0_0:1.20.0.2
	REL8_0_0RC5:1.20
	REL8_0_0RC4:1.20
	REL8_0_0RC3:1.20
	REL8_0_0RC2:1.20
	REL8_0_0RC1:1.20
	REL8_0_0BETA5:1.20
	REL8_0_0BETA4:1.20
	REL7_4_6:1.19.8.1
	REL7_3_8:1.19
	REL7_2_6:1.19
	REL8_0_0BETA3:1.20
	REL8_0_0BETA2:1.20
	REL7_2_5:1.19
	REL7_4_5:1.19.8.1
	REL7_3_7:1.19
	REL7_4_4:1.19.8.1
	REL8_0_0BETA1:1.20
	REL7_4_3:1.19.8.1
	REL7_4_2:1.19.8.1
	REL7_3_6:1.19
	REL7_4_1:1.19.8.1
	REL7_3_5:1.19
	REL7_4:1.19.8.1
	REL7_4_RC2:1.19
	REL7_4_STABLE:1.19.0.8
	REL7_4_RC1:1.19
	REL7_4_BETA5:1.19
	REL7_4_BETA4:1.19
	REL7_4_BETA3:1.19
	REL7_4_BETA2:1.19
	WIN32_DEV:1.19.0.6
	REL7_4_BETA1:1.19
	REL7_3_4:1.19
	REL7_3_2:1.19
	REL7_2_4:1.19
	REL7_3_STABLE:1.19.0.4
	REL7_2_3:1.19
	REL7_2_STABLE:1.19.0.2
	REL7_2:1.19
	REL7_2_RC2:1.19
	REL7_2_RC1:1.19
	REL7_2_BETA5:1.19
	REL7_2_BETA4:1.19
	REL7_2_BETA3:1.19
	REL7_2_BETA2:1.19
	REL7_2_BETA1:1.19
	REL7_1_2:1.17
	REL7_1_STABLE:1.17.0.2
	REL7_1_BETA:1.15
	REL7_1_BETA3:1.16
	REL7_1_BETA2:1.16
	REL7_1:1.17
	REL7_0_PATCHES:1.13.0.2
	REL7_0:1.13
	REL6_5_PATCHES:1.11.0.4
	REL6_5:1.11
	REL6_4:1.11.0.2
	release-6-3:1.9
	REL2_0B:1.3.0.2
	REL2_0:1.3
	Release_2_0_0:1.2
	Release_1_0_3:1.2.0.2
	Release_2_0:1.2
	Release_1_0_2:1.2;
locks; strict;
comment	@# @;


1.22
date	2006.04.06.18.54.37;	author petere;	state dead;
branches;
next	1.21;

1.21
date	2005.07.24.17.18.52;	author tgl;	state Exp;
branches;
next	1.20;

1.20
date	2003.11.13.18.03.11;	author petere;	state Exp;
branches;
next	1.19;

1.19
date	2001.09.21.18.37.05;	author petere;	state Exp;
branches
	1.19.8.1;
next	1.18;

1.18
date	2001.08.06.22.55.00;	author tgl;	state dead;
branches;
next	1.17;

1.17
date	2001.03.20.00.09.35;	author tgl;	state Exp;
branches;
next	1.16;

1.16
date	2001.01.02.05.56.01;	author tgl;	state Exp;
branches;
next	1.15;

1.15
date	2000.11.22.00.58.47;	author tgl;	state Exp;
branches;
next	1.14;

1.14
date	2000.10.17.15.26.40;	author petere;	state Exp;
branches;
next	1.13;

1.13
date	2000.01.09.20.54.36;	author tgl;	state Exp;
branches;
next	1.12;

1.12
date	2000.01.09.07.53.58;	author tgl;	state Exp;
branches;
next	1.11;

1.11
date	98.10.24.22.21.12;	author tgl;	state Exp;
branches;
next	1.10;

1.10
date	98.07.12.18.48.08;	author momjian;	state Exp;
branches;
next	1.9;

1.9
date	97.06.03.14.18.38;	author thomas;	state Exp;
branches;
next	1.8;

1.8
date	97.05.17.06.17.45;	author thomas;	state Exp;
branches;
next	1.7;

1.7
date	97.05.11.15.46.17;	author thomas;	state Exp;
branches;
next	1.6;

1.6
date	97.04.27.02.56.12;	author scrappy;	state Exp;
branches;
next	1.5;

1.5
date	97.04.08.19.34.58;	author scrappy;	state Exp;
branches;
next	1.4;

1.4
date	97.04.05.21.28.46;	author scrappy;	state Exp;
branches;
next	1.3;

1.3
date	96.12.02.06.31.09;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	96.08.02.01.24.00;	author scrappy;	state Exp;
branches;
next	1.1;

1.1
date	96.08.01.04.53.22;	author scrappy;	state Exp;
branches;
next	;

1.19.8.1
date	2003.11.13.17.59.35;	author petere;	state Exp;
branches;
next	;


desc
@@


1.22
log
@Build src/test/regress/README during tarball making like the other
generated text files.  Fix build of that file, too.

Put the text files in the right place during make dist, so there are no
extra manual steps required anymore.
@
text
@
                              Regression Tests

   The regression tests are a comprehensive set of tests for the SQL
   implementation in PostgreSQL. They test standard SQL operations as
   well as the extended capabilities of PostgreSQL.
     _________________________________________________________________

                             Running the Tests

   The regression tests can be run against an already installed and
   running server, or using a temporary installation within the build
   tree. Furthermore, there is a "parallel" and a "sequential" mode for
   running the tests. The sequential method runs each test script in
   turn, whereas the parallel method starts up multiple server processes
   to run groups of tests in parallel. Parallel testing gives confidence
   that interprocess communication and locking are working correctly. For
   historical reasons, the sequential test is usually run against an
   existing installation and the parallel method against a temporary
   installation, but there are no technical reasons for this.

   To run the regression tests after building but before installation,
   type
gmake check

   in the top-level directory. (Or you can change to "src/test/regress"
   and run the command there.) This will first build several auxiliary
   files, such as some sample user-defined trigger functions, and then
   run the test driver script. At the end you should see something like
======================
 All 98 tests passed.
======================

   or otherwise a note about which tests failed. See the section called
   Test Evaluation below before assuming that a "failure" represents a
   serious problem.

   Because this test method runs a temporary server, it will not work
   when you are the root user (since the server will not start as root).
   If you already did the build as root, you do not have to start all
   over. Instead, make the regression test directory writable by some
   other user, log in as that user, and restart the tests. For example
root# chmod -R a+w src/test/regress
root# chmod -R a+w contrib/spi
root# su - joeuser
joeuser$ cd top-level build directory
joeuser$ gmake check

   (The only possible "security risk" here is that other users might be
   able to alter the regression test results behind your back. Use common
   sense when managing user permissions.)

   Alternatively, run the tests after installation.

   If you have configured PostgreSQL to install into a location where an
   older PostgreSQL installation already exists, and you perform gmake
   check before installing the new version, you may find that the tests
   fail because the new programs try to use the already-installed shared
   libraries. (Typical symptoms are complaints about undefined symbols.)
   If you wish to run the tests before overwriting the old installation,
   you'll need to build with configure --disable-rpath. It is not
   recommended that you use this option for the final installation,
   however.

   The parallel regression test starts quite a few processes under your
   user ID. Presently, the maximum concurrency is twenty parallel test
   scripts, which means sixty processes: there's a server process, a
   psql, and usually a shell parent process for the psql for each test
   script. So if your system enforces a per-user limit on the number of
   processes, make sure this limit is at least seventy-five or so, else
   you may get random-seeming failures in the parallel test. If you are
   not in a position to raise the limit, you can cut down the degree of
   parallelism by setting the MAX_CONNECTIONS parameter. For example,
gmake MAX_CONNECTIONS=10 check

   runs no more than ten tests concurrently.

   On some systems, the default Bourne-compatible shell ("/bin/sh") gets
   confused when it has to manage too many child processes in parallel.
   This may cause the parallel test run to lock up or fail. In such
   cases, specify a different Bourne-compatible shell on the command
   line, for example:
gmake SHELL=/bin/ksh check

   If no non-broken shell is available, you may be able to work around
   the problem by limiting the number of connections, as shown above.

   To run the tests after installation, initialize a data area and start
   the server, then type
gmake installcheck

   or for a parallel test
gmake installcheck-parallel

   The tests will expect to contact the server at the local host and the
   default port number, unless directed otherwise by PGHOST and PGPORT
   environment variables.
     _________________________________________________________________

                              Test Evaluation

   Some properly installed and fully functional PostgreSQL installations
   can "fail" some of these regression tests due to platform-specific
   artifacts such as varying floating-point representation and message
   wording. The tests are currently evaluated using a simple "diff"
   comparison against the outputs generated on a reference system, so the
   results are sensitive to small system differences. When a test is
   reported as "failed", always examine the differences between expected
   and actual results; you may well find that the differences are not
   significant. Nonetheless, we still strive to maintain accurate
   reference files across all supported platforms, so it can be expected
   that all tests pass.

   The actual outputs of the regression tests are in files in the
   "src/test/regress/results" directory. The test script uses "diff" to
   compare each output file against the reference outputs stored in the
   "src/test/regress/expected" directory. Any differences are saved for
   your inspection in "src/test/regress/regression.diffs". (Or you can
   run "diff" yourself, if you prefer.)

   If for some reason a particular platform generates a "failure" for a
   given test, but inspection of the output convinces you that the result
   is valid, you can add a new comparison file to silence the failure
   report in future test runs. See the section called Variant Comparison
   Files for details.
     _________________________________________________________________

                         Error message differences

   Some of the regression tests involve intentional invalid input values.
   Error messages can come from either the PostgreSQL code or from the
   host platform system routines. In the latter case, the messages may
   vary between platforms, but should reflect similar information. These
   differences in messages will result in a "failed" regression test that
   can be validated by inspection.
     _________________________________________________________________

                             Locale differences

   If you run the tests against an already-installed server that was
   initialized with a collation-order locale other than C, then there may
   be differences due to sort order and follow-up failures. The
   regression test suite is set up to handle this problem by providing
   alternative result files that together are known to handle a large
   number of locales.
     _________________________________________________________________

                         Date and time differences

   Most of the date and time results are dependent on the time zone
   environment. The reference files are generated for time zone PST8PDT
   (Berkeley, California), and there will be apparent failures if the
   tests are not run with that time zone setting. The regression test
   driver sets environment variable PGTZ to PST8PDT, which normally
   ensures proper results.
     _________________________________________________________________

                         Floating-point differences

   Some of the tests involve computing 64-bit floating-point numbers
   (double precision) from table columns. Differences in results
   involving mathematical functions of double precision columns have been
   observed. The float8 and geometry tests are particularly prone to
   small differences across platforms, or even with different compiler
   optimization options. 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.

   Some systems display minus zero as -0, while others just show 0.

   Some systems signal errors from pow() and exp() differently from the
   mechanism expected by the current PostgreSQL code.
     _________________________________________________________________

                          Row ordering differences

   You might see differences in which the same rows are output in a
   different order than what appears in the expected file. In most cases
   this is not, strictly speaking, a bug. Most of the regression test
   scripts are not so pedantic as to use an ORDER BY for every single
   SELECT, and so their result row orderings are not well-defined
   according to the letter of the SQL specification. In practice, since
   we are looking at the same queries being executed on the same data by
   the same software, we usually get the same result ordering on all
   platforms, and so the lack of ORDER BY isn't a problem. Some queries
   do exhibit cross-platform ordering differences, however. When testing
   against an already-installed server, ordering differences can also be
   caused by non-C locale settings or non-default parameter settings,
   such as custom values of work_mem or the planner cost parameters.

   Therefore, if you see an ordering difference, it's not something to
   worry about, unless the query does have an ORDER BY that your result
   is violating. But please report it anyway, so that we can add an ORDER
   BY to that particular query and thereby eliminate the bogus "failure"
   in future releases.

   You might wonder why we don't order all the regression test queries
   explicitly to get rid of this issue once and for all. The reason is
   that that would make the regression tests less useful, not more, since
   they'd tend to exercise query plan types that produce ordered results
   to the exclusion of those that don't.
     _________________________________________________________________

                             The "random" test

   The random test script is intended to produce random results. In rare
   cases, this causes the random regression test to fail. Typing
diff results/random.out expected/random.out

   should produce only one or a few lines of differences. You need not
   worry unless the random test fails repeatedly.
     _________________________________________________________________

                          Variant Comparison Files

   Since some of the tests inherently produce environment-dependent
   results, we have provided ways to specify alternative "expected"
   result files. Each regression test can have several comparison files
   showing possible results on different platforms. There are two
   independent mechanisms for determining which comparison file is used
   for each test.

   The first mechanism allows comparison files to be selected for
   specific platforms. There is a mapping file,
   "src/test/regress/resultmap", that defines which comparison file to
   use for each platform. To eliminate bogus test "failures" for a
   particular platform, you first choose or make a variant result file,
   and then add a line to the "resultmap" file.

   Each line in the mapping file is of the form
testname/platformpattern=comparisonfilename

   The test name is just the name of the particular regression test
   module. The platform pattern is a pattern in the style of the Unix
   tool "expr" (that is, a regular expression with an implicit ^ anchor
   at the start). It is matched against the platform name as printed by
   "config.guess" followed by :gcc or :cc, depending on whether you use
   the GNU compiler or the system's native compiler (on systems where
   there is a difference). The comparison file name is the base name of
   the substitute result comparison file.

   For example: some systems interpret very small floating-point values
   as zero, rather than reporting an underflow error. This causes a few
   differences in the "float8" regression test. Therefore, we provide a
   variant comparison file, "float8-small-is-zero.out", which includes
   the results to be expected on these systems. To silence the bogus
   "failure" message on OpenBSD platforms, "resultmap" includes
float8/i.86-.*-openbsd=float8-small-is-zero

   which will trigger on any machine for which the output of
   "config.guess" matches i.86-.*-openbsd. Other lines in "resultmap"
   select the variant comparison file for other platforms where it's
   appropriate.

   The second selection mechanism for variant comparison files is much
   more automatic: it simply uses the "best match" among several supplied
   comparison files. The regression test driver script considers both the
   standard comparison file for a test, testname.out, and variant files
   named testname_digit.out (where the "digit" is any single digit 0-9).
   If any such file is an exact match, the test is considered to pass;
   otherwise, the one that generates the shortest diff is used to create
   the failure report. (If "resultmap" includes an entry for the
   particular test, then the base "testname" is the substitute name given
   in "resultmap".)

   For example, for the char test, the comparison file "char.out"
   contains results that are expected in the C and POSIX locales, while
   the file "char_1.out" contains results sorted as they appear in many
   other locales.

   The best-match mechanism was devised to cope with locale-dependent
   results, but it can be used in any situation where the test results
   cannot be predicted easily from the platform name alone. A limitation
   of this mechanism is that the test driver cannot tell which variant is
   actually "correct" for the current environment; it will just pick the
   variant that seems to work best. Therefore it is safest to use this
   mechanism only for variant results that you are willing to consider
   equally valid in all contexts.
@


1.21
log
@Regenerate badly-obsolete README file.
@
text
@@


1.20
log
@Regenerate text files.
@
text
@a0 1
                                Regression Tests
d2 277
a278 278
The regression tests are a comprehensive set of tests for the SQL
implementation in PostgreSQL. They test standard SQL operations as well as the
extended capabilities of PostgreSQL. From PostgreSQL 6.1 onward, the regression
tests are current for every official release.

-------------------------------------------------------------------------------

Running the Tests

The regression test can be run against an already installed and running server,
or using a temporary installation within the build tree. Furthermore, there is
a "parallel" and a "sequential" mode for running the tests. The sequential
method runs each test script in turn, whereas the parallel method starts up
multiple server processes to run groups of tests in parallel. Parallel testing
gives confidence that interprocess communication and locking are working
correctly. For historical reasons, the sequential test is usually run against
an existing installation and the parallel method against a temporary
installation, but there are no technical reasons for this.

To run the regression tests after building but before installation, type

  gmake check

in the top-level directory. (Or you can change to "src/test/regress" and run
the command there.) This will first build several auxiliary files, such as some
sample user-defined trigger functions, and then run the test driver script. At
the end you should see something like

  ======================
   All 93 tests passed.
  ======================

or otherwise a note about which tests failed. See the Section called Test
Evaluation below for more.

Because this test method runs a temporary server, it will not work when you are
the root user (since the server will not start as root). If you already did the
build as root, you do not have to start all over. Instead, make the regression
test directory writable by some other user, log in as that user, and restart
the tests. For example

  root# chmod -R a+w src/test/regress
  root# chmod -R a+w contrib/spi
  root# su - joeuser
  joeuser$ cd top-level build directory
  joeuser$ gmake check

(The only possible "security risk" here is that other users might be able to
alter the regression test results behind your back. Use common sense when
managing user permissions.)

Alternatively, run the tests after installation.

The parallel regression test starts quite a few processes under your user ID.
Presently, the maximum concurrency is twenty parallel test scripts, which means
sixty processes: there's a server process, a psql, and usually a shell parent
process for the psql for each test script. So if your system enforces a per-
user limit on the number of processes, make sure this limit is at least
seventy-five or so, else you may get random-seeming failures in the parallel
test. If you are not in a position to raise the limit, you can cut down the
degree of parallelism by setting the MAX_CONNECTIONS parameter. For example,

  gmake MAX_CONNECTIONS=10 check

runs no more than ten tests concurrently.

On some systems, the default Bourne-compatible shell ("/bin/sh") gets confused
when it has to manage too many child processes in parallel. This may cause the
parallel test run to lock up or fail. In such cases, specify a different
Bourne-compatible shell on the command line, for example:

  gmake SHELL=/bin/ksh check

If no non-broken shell is available, you may be able to work around the problem
by limiting the number of connections, as shown above.

To run the tests after installation, initialize a data area and start the
server, then type

  gmake installcheck

The tests will expect to contact the server at the local host and the default
port number, unless directed otherwise by PGHOST and PGPORT environment
variables.

-------------------------------------------------------------------------------

Test Evaluation

Some properly installed and fully functional PostgreSQL installations can
"fail" some of these regression tests due to platform-specific artifacts such
as varying floating-point representation and time zone support. The tests are
currently evaluated using a simple "diff" comparison against the outputs
generated on a reference system, so the results are sensitive to small system
differences. When a test is reported as "failed", always examine the
differences between expected and actual results; you may well find that the
differences are not significant. Nonetheless, we still strive to maintain
accurate reference files across all supported platforms, so it can be expected
that all tests pass.

The actual outputs of the regression tests are in files in the "src/test/
regress/results" directory. The test script uses "diff" to compare each output
file against the reference outputs stored in the "src/test/regress/expected"
directory. Any differences are saved for your inspection in "src/test/regress/
regression.diffs". (Or you can run "diff" yourself, if you prefer.)

-------------------------------------------------------------------------------

Error message differences

Some of the regression tests involve intentional invalid input values. Error
messages can come from either the PostgreSQL code or from the host platform
system routines. In the latter case, the messages may vary between platforms,
but should reflect similar information. These differences in messages will
result in a "failed" regression test that can be validated by inspection.

-------------------------------------------------------------------------------

Locale differences

If you run the tests against an already-installed server that was initialized
with a collation-order locale other than C, then there may be differences due
to sort order and follow-up failures. The regression test suite is set up to
handle this problem by providing alternative result files that together are
known to handle a large number of locales. For example, for the char test, the
expected file "char.out" handles the C and POSIX locales, and the file
"char_1.out" handles many other locales. The regression test driver will
automatically pick the best file to match against when checking for success and
for computing failure differences. (This means that the regression tests cannot
detect whether the results are appropriate for the configured locale. The tests
will simply pick the one result file that works best.)

If for some reason the existing expected files do not cover some locale, you
can add a new file. The naming scheme is testname_digit.out. The actual digit
is not significant. Remember that the regression test driver will consider all
such files to be equally valid test results. If the test results are platform-
specific, the technique described in the Section called Platform-specific
comparison files should be used instead.

-------------------------------------------------------------------------------

Date and time differences

A few of the queries in the "horology" test will fail if you run the test on
the day of a daylight-saving time changeover, or the day after one. These
queries expect that the intervals between midnight yesterday, midnight today
and midnight tomorrow are exactly twenty-four hours --- which is wrong if
daylight-saving time went into or out of effect meanwhile.

     Note: Because USA daylight-saving time rules are used, this problem
     always occurs on the first Sunday of April, the last Sunday of
     October, and their following Mondays, regardless of when daylight-
     saving time is in effect where you live. Also note that the problem
     appears or disappears at midnight Pacific time (UTC-7 or UTC-8), not
     midnight your local time. Thus the failure may appear late on
     Saturday or persist through much of Tuesday, depending on where you
     live.

Most of the date and time results are dependent on the time zone environment.
The reference files are generated for time zone PST8PDT (Berkeley, California),
and there will be apparent failures if the tests are not run with that time
zone setting. The regression test driver sets environment variable PGTZ to
PST8PDT, which normally ensures proper results. However, your operating system
must provide support for the PST8PDT time zone, or the time zone-dependent
tests will fail. To verify that your machine does have this support, type the
following:

  env TZ=PST8PDT date

The command above should have returned the current system time in the PST8PDT
time zone. If the PST8PDT time zone is not available, then your system may have
returned the time in UTC. If the PST8PDT time zone is missing, you can set the
time zone rules explicitly:

  PGTZ='PST8PDT7,M04.01.0,M10.05.03'; export PGTZ

There appear to be some systems that do not accept the recommended syntax for
explicitly setting the local time zone rules; you may need to use a different
PGTZ setting on such machines.

Some systems using older time-zone libraries fail to apply daylight-saving
corrections to dates before 1970, causing pre-1970 PDT times to be displayed in
PST instead. This will result in localized differences in the test results.

-------------------------------------------------------------------------------

Floating-point differences

Some of the tests involve computing 64-bit floating-point numbers (double
precision) from table columns. Differences in results involving mathematical
functions of double precision columns have been observed. The float8 and
geometry tests are particularly prone to small differences across platforms, or
even with different compiler optimization options. 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.

Some systems display minus zero as -0, while others just show 0.

Some systems signal errors from pow() and exp() differently from the mechanism
expected by the current PostgreSQL code.

-------------------------------------------------------------------------------

Row ordering differences

You might see differences in which the same rows are output in a different
order than what appears in the expected file. In most cases this is not,
strictly speaking, a bug. Most of the regression test scripts are not so
pedantic as to use an ORDER BY for every single SELECT, and so their result row
orderings are not well-defined according to the letter of the SQL
specification. In practice, since we are looking at the same queries being
executed on the same data by the same software, we usually get the same result
ordering on all platforms, and so the lack of ORDER BY isn't a problem. Some
queries do exhibit cross-platform ordering differences, however. (Ordering
differences can also be triggered by non-C locale settings.)

Therefore, if you see an ordering difference, it's not something to worry
about, unless the query does have an ORDER BY that your result is violating.
But please report it anyway, so that we can add an ORDER BY to that particular
query and thereby eliminate the bogus "failure" in future releases.

You might wonder why we don't order all the regression test queries explicitly
to get rid of this issue once and for all. The reason is that that would make
the regression tests less useful, not more, since they'd tend to exercise query
plan types that produce ordered results to the exclusion of those that don't.

-------------------------------------------------------------------------------

The "random" test

There is at least one case in the random test script that is intended to
produce random results. This causes random to fail the regression test once in
a while (perhaps once in every five to ten trials). Typing

  diff results/random.out expected/random.out

should produce only one or a few lines of differences. You need not worry
unless the random test always fails in repeated attempts. (On the other hand,
if the random test is *never* reported to fail even in many trials of the
regression tests, you probably *should* worry.)

-------------------------------------------------------------------------------

Platform-specific comparison files

Since some of the tests inherently produce platform-specific results, we have
provided a way to supply platform-specific result comparison files. Frequently,
the same variation applies to multiple platforms; rather than supplying a
separate comparison file for every platform, there is a mapping file that
defines which comparison file to use. So, to eliminate bogus test "failures"
for a particular platform, you must choose or make a variant result file, and
then add a line to the mapping file, which is "src/test/regress/resultmap".

Each line in the mapping file is of the form

  testname/platformpattern=comparisonfilename

The test name is just the name of the particular regression test module. The
platform pattern is a pattern in the style of the Unix tool "expr" (that is, a
regular expression with an implicit ^ anchor at the start). It is matched
against the platform name as printed by "config.guess" followed by :gcc or :cc,
depending on whether you use the GNU compiler or the system's native compiler
(on systems where there is a difference). The comparison file name is the name
of the substitute result comparison file.

For example: some systems using older time zone libraries fail to apply
daylight-saving corrections to dates before 1970, causing pre-1970 PDT times to
be displayed in PST instead. This causes a few differences in the "horology"
regression test. Therefore, we provide a variant comparison file, "horology-no-
DST-before-1970.out", which includes the results to be expected on these
systems. To silence the bogus "failure" message on HPUX platforms, "resultmap"
includes

  horology/.*-hpux=horology-no-DST-before-1970

which will trigger on any machine for which the output of "config.guess"
includes -hpux. Other lines in "resultmap" select the variant comparison file
for other platforms where it's appropriate.
@


1.19
log
@Readd test/regress/README file, this time with a well-defined and simple
rule to remake it when necessary.
@
text
@d1 1
a1 3
Regression Tests

Introduction
d4 3
a6 5
implementation in PostgreSQL. They test standard SQL operations as well as
the extended capabilities of PostgreSQL. The test suite was originally
developed by Jolly Chen and Andrew Yu, and was extensively revised and
repackaged by Marc Fournier and Thomas Lockhart. From PostgreSQL 6.1 onward
the regression tests are current for every official release.
d8 1
a8 1
  ------------------------------------------------------------------------
d12 9
a20 10
The regression test can be run against an already installed and running
server, or using a temporary installation within the build tree.
Furthermore, there is a "parallel" and a "sequential" mode for running the
tests. The sequential method runs each test script in turn, whereas the
parallel method starts up multiple server processes to run groups of tests
in parallel. Parallel testing gives confidence that interprocess
communication and locking are working correctly. For historical reasons, the
sequential test is usually run against an existing installation and the
parallel method against a temporary installation, but there are no technical
reasons for this.
d24 1
a24 1
$ gmake check
d26 8
a33 9
in the top-level directory. (Or you can change to src/test/regress and run
the command there.) This will first build several auxiliary files, such as
platform-dependent "expected" files and some sample user-defined trigger
functions, and then run the test driver script. At the end you should see
something like

======================
 All 77 tests passed.
======================
d35 1
a35 1
or otherwise a note about what tests failed. See the Section called Test
d38 37
a74 24
     Note: Because this test method runs a temporary server, it will
     not work when you are the root user (the server will not start as
     root). If you already did the build as root, you do not have to
     start all over. Instead, make the regression test directory
     writable by some other user, log in as that user, and restart the
     tests. For example,

     root# chmod -R a+w src/test/regress
     root# chmod -R a+w contrib/spi
     root# su - joeuser
     joeuser$ cd <build top-level directory>
     joeuser$ gmake check

     (The only possible "security risk" here is that other users might
     be able to alter the regression test results behind your back. Use
     common sense when managing user permissions.)

     Alternatively, run the tests after installation.

     Tip: On some systems, the default Bourne-compatible shell
     (/bin/sh) gets confused when it has to manage too many child
     processes in parallel. This may cause the parallel test run to
     lock up or fail. In such cases, specify a different
     Bourne-compatible shell on the command line, for example:
d76 2
a77 1
     $ gmake SHELL=/bin/ksh check
d82 1
a82 1
$ gmake installcheck
d84 3
a86 3
The tests will expect to contact the server at the local host and the
default port number, unless directed otherwise by PGHOST and PGPORT
environment variables.
d88 1
a88 1
  ------------------------------------------------------------------------
d93 15
a107 16
"fail" some of these regression tests due to platform-specific artifacts
such as varying floating point representation and time zone support. The
tests are currently evaluated using a simple diff comparison against the
outputs generated on a reference system, so the results are sensitive to
small system differences. When a test is reported as "failed", always
examine the differences between expected and actual results; you may well
find that the differences are not significant. Nonetheless, we still strive
to maintain accurate reference files across all supported platforms, so it
can be expected that all tests pass.

The actual outputs of the regression tests are in files in the
src/test/regress/results directory. The test script uses diff to compare
each output file against the reference outputs stored in the
src/test/regress/expected directory. Any differences are saved for your
inspection in src/test/regress/regression.diffs. (Or you can run diff
yourself, if you prefer.)
d109 1
a109 1
  ------------------------------------------------------------------------
d115 3
a117 4
system routines. In the latter case, the messages may vary between
platforms, but should reflect similar information. These differences in
messages will result in a "failed" regression test that can be validated by
inspection.
d119 1
a119 1
  ------------------------------------------------------------------------
d123 18
a140 13
The tests expect to run in plain "C" locale. This should not cause any
problems when you run the tests against a temporary installation, since the
regression test driver takes care to start the server in C locale. However,
if you run the tests against an already-installed server that is using non-C
locale settings, you may see differences caused by varying rules for string
sort order, formatting of numeric and monetary values, and so forth.

In some locales the resulting differences are small and easily checked by
inspection. However, in a locale that changes the rules for formatting of
numeric values (typically by swapping the usage of commas and decimal
points), entry of some data values will fail, resulting in extensive
differences later in the tests where the missing data values are supposed to
be used.
d142 1
a142 1
  ------------------------------------------------------------------------
d146 52
a197 63
Some of the queries in the timestamp test will fail if you run the test on
the day of a daylight-savings time changeover, or the day before or after
one. These queries assume that the intervals between midnight yesterday,
midnight today and midnight tomorrow are exactly twenty-four hours -- which
is wrong if daylight-savings time went into or out of effect meanwhile.

Most of the date and time results are dependent on the time zone
environment. The reference files are generated for time zone PST8PDT
(Berkeley, California) and there will be apparent failures if the tests are
not run with that time zone setting. The regression test driver sets
environment variable PGTZ to PST8PDT, which normally ensures proper results.
However, your system must provide library support for the PST8PDT time zone,
or the time zone-dependent tests will fail. To verify that your machine does
have this support, type the following:

$ env TZ=PST8PDT date

The command above should have returned the current system time in the
PST8PDT time zone. If the PST8PDT database is not available, then your
system may have returned the time in GMT. If the PST8PDT time zone is not
available, you can set the time zone rules explicitly:

PGTZ='PST8PDT7,M04.01.0,M10.05.03'; export PGTZ

There appear to be some systems that do not accept the recommended syntax
for explicitly setting the local time zone rules; you may need to use a
different PGTZ setting on such machines.

Some systems using older time zone libraries fail to apply daylight-savings
corrections to dates before 1970, causing pre-1970 PDT times to be displayed
in PST instead. This will result in localized differences in the test
results.

  ------------------------------------------------------------------------

Floating point differences

Some of the tests involve computing 64-bit (double precision) numbers from
table columns. Differences in results involving mathematical functions of
double precision columns have been observed. The float8 and geometry tests
are particularly prone to small differences across platforms, or even with
different compiler optimization options. 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.

Some systems signal errors from pow() and exp() differently from the
mechanism expected by the current PostgreSQL code.

  ------------------------------------------------------------------------

Polygon differences

Several of the tests involve operations on geographic data about the
Oakland/Berkeley, California street map. The map data is expressed as
polygons whose vertices are represented as pairs of double precision numbers
(decimal latitude and longitude). Initially, some tables are created and
loaded with geographic data, then some views are created that 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 following:
d199 1
a199 2
SELECT * from street;
SELECT * from iexit;
d201 4
a204 1
  ------------------------------------------------------------------------
d211 2
a212 2
pedantic as to use an ORDER BY for every single SELECT, and so their result
row orderings are not well-defined according to the letter of the SQL
d214 4
a217 5
executed on the same data by the same software, we usually get the same
result ordering on all platforms, and so the lack of ORDER BY isn't a
problem. Some queries do exhibit cross-platform ordering differences,
however. (Ordering differences can also be triggered by non-C locale
settings.)
d221 7
a227 9
But please report it anyway, so that we can add an ORDER BY to that
particular query and thereby eliminate the bogus "failure" in future
releases.

You might wonder why we don't order all the regress test queries explicitly
to get rid of this issue once and for all. The reason is that that would
make the regression tests less useful, not more, since they'd tend to
exercise query plan types that produce ordered results to the exclusion of
those that don't.
d229 1
a229 1
  ------------------------------------------------------------------------
d233 3
a235 3
There is at least one case in the "random" test script that is intended to
produce random results. This causes random to fail the regression test once
in a while (perhaps once in every five to ten trials). Typing
d237 1
a237 1
diff results/random.out expected/random.out
d240 41
a280 3
unless the random test always fails in repeated attempts. (On the other
hand, if the random test is never reported to fail even in many trials of
the regression tests, you probably should worry.)
@


1.19.8.1
log
@Regenerate text files.
@
text
@d1 3
a3 1
                                Regression Tests
d6 5
a10 3
implementation in PostgreSQL. They test standard SQL operations as well as the
extended capabilities of PostgreSQL. From PostgreSQL 6.1 onward, the regression
tests are current for every official release.
d12 1
a12 1
-------------------------------------------------------------------------------
d16 10
a25 9
The regression test can be run against an already installed and running server,
or using a temporary installation within the build tree. Furthermore, there is
a "parallel" and a "sequential" mode for running the tests. The sequential
method runs each test script in turn, whereas the parallel method starts up
multiple server processes to run groups of tests in parallel. Parallel testing
gives confidence that interprocess communication and locking are working
correctly. For historical reasons, the sequential test is usually run against
an existing installation and the parallel method against a temporary
installation, but there are no technical reasons for this.
d29 1
a29 1
  gmake check
d31 9
a39 8
in the top-level directory. (Or you can change to "src/test/regress" and run
the command there.) This will first build several auxiliary files, such as some
sample user-defined trigger functions, and then run the test driver script. At
the end you should see something like

  ======================
   All 93 tests passed.
  ======================
d41 1
a41 1
or otherwise a note about which tests failed. See the Section called Test
d44 24
a67 37
Because this test method runs a temporary server, it will not work when you are
the root user (since the server will not start as root). If you already did the
build as root, you do not have to start all over. Instead, make the regression
test directory writable by some other user, log in as that user, and restart
the tests. For example

  root# chmod -R a+w src/test/regress
  root# chmod -R a+w contrib/spi
  root# su - joeuser
  joeuser$ cd top-level build directory
  joeuser$ gmake check

(The only possible "security risk" here is that other users might be able to
alter the regression test results behind your back. Use common sense when
managing user permissions.)

Alternatively, run the tests after installation.

The parallel regression test starts quite a few processes under your user ID.
Presently, the maximum concurrency is twenty parallel test scripts, which means
sixty processes: there's a server process, a psql, and usually a shell parent
process for the psql for each test script. So if your system enforces a per-
user limit on the number of processes, make sure this limit is at least
seventy-five or so, else you may get random-seeming failures in the parallel
test. If you are not in a position to raise the limit, you can cut down the
degree of parallelism by setting the MAX_CONNECTIONS parameter. For example,

  gmake MAX_CONNECTIONS=10 check

runs no more than ten tests concurrently.

On some systems, the default Bourne-compatible shell ("/bin/sh") gets confused
when it has to manage too many child processes in parallel. This may cause the
parallel test run to lock up or fail. In such cases, specify a different
Bourne-compatible shell on the command line, for example:

  gmake SHELL=/bin/ksh check
d69 1
a69 2
If no non-broken shell is available, you may be able to work around the problem
by limiting the number of connections, as shown above.
d74 1
a74 1
  gmake installcheck
d76 3
a78 3
The tests will expect to contact the server at the local host and the default
port number, unless directed otherwise by PGHOST and PGPORT environment
variables.
d80 1
a80 1
-------------------------------------------------------------------------------
d85 16
a100 15
"fail" some of these regression tests due to platform-specific artifacts such
as varying floating-point representation and time zone support. The tests are
currently evaluated using a simple "diff" comparison against the outputs
generated on a reference system, so the results are sensitive to small system
differences. When a test is reported as "failed", always examine the
differences between expected and actual results; you may well find that the
differences are not significant. Nonetheless, we still strive to maintain
accurate reference files across all supported platforms, so it can be expected
that all tests pass.

The actual outputs of the regression tests are in files in the "src/test/
regress/results" directory. The test script uses "diff" to compare each output
file against the reference outputs stored in the "src/test/regress/expected"
directory. Any differences are saved for your inspection in "src/test/regress/
regression.diffs". (Or you can run "diff" yourself, if you prefer.)
d102 1
a102 1
-------------------------------------------------------------------------------
d108 4
a111 3
system routines. In the latter case, the messages may vary between platforms,
but should reflect similar information. These differences in messages will
result in a "failed" regression test that can be validated by inspection.
d113 1
a113 1
-------------------------------------------------------------------------------
d117 13
a129 18
If you run the tests against an already-installed server that was initialized
with a collation-order locale other than C, then there may be differences due
to sort order and follow-up failures. The regression test suite is set up to
handle this problem by providing alternative result files that together are
known to handle a large number of locales. For example, for the char test, the
expected file "char.out" handles the C and POSIX locales, and the file
"char_1.out" handles many other locales. The regression test driver will
automatically pick the best file to match against when checking for success and
for computing failure differences. (This means that the regression tests cannot
detect whether the results are appropriate for the configured locale. The tests
will simply pick the one result file that works best.)

If for some reason the existing expected files do not cover some locale, you
can add a new file. The naming scheme is testname_digit.out. The actual digit
is not significant. Remember that the regression test driver will consider all
such files to be equally valid test results. If the test results are platform-
specific, the technique described in the Section called Platform-specific
comparison files should be used instead.
d131 1
a131 1
-------------------------------------------------------------------------------
d135 63
a197 52
A few of the queries in the "horology" test will fail if you run the test on
the day of a daylight-saving time changeover, or the day after one. These
queries expect that the intervals between midnight yesterday, midnight today
and midnight tomorrow are exactly twenty-four hours --- which is wrong if
daylight-saving time went into or out of effect meanwhile.

     Note: Because USA daylight-saving time rules are used, this problem
     always occurs on the first Sunday of April, the last Sunday of
     October, and their following Mondays, regardless of when daylight-
     saving time is in effect where you live. Also note that the problem
     appears or disappears at midnight Pacific time (UTC-7 or UTC-8), not
     midnight your local time. Thus the failure may appear late on
     Saturday or persist through much of Tuesday, depending on where you
     live.

Most of the date and time results are dependent on the time zone environment.
The reference files are generated for time zone PST8PDT (Berkeley, California),
and there will be apparent failures if the tests are not run with that time
zone setting. The regression test driver sets environment variable PGTZ to
PST8PDT, which normally ensures proper results. However, your operating system
must provide support for the PST8PDT time zone, or the time zone-dependent
tests will fail. To verify that your machine does have this support, type the
following:

  env TZ=PST8PDT date

The command above should have returned the current system time in the PST8PDT
time zone. If the PST8PDT time zone is not available, then your system may have
returned the time in UTC. If the PST8PDT time zone is missing, you can set the
time zone rules explicitly:

  PGTZ='PST8PDT7,M04.01.0,M10.05.03'; export PGTZ

There appear to be some systems that do not accept the recommended syntax for
explicitly setting the local time zone rules; you may need to use a different
PGTZ setting on such machines.

Some systems using older time-zone libraries fail to apply daylight-saving
corrections to dates before 1970, causing pre-1970 PDT times to be displayed in
PST instead. This will result in localized differences in the test results.

-------------------------------------------------------------------------------

Floating-point differences

Some of the tests involve computing 64-bit floating-point numbers (double
precision) from table columns. Differences in results involving mathematical
functions of double precision columns have been observed. The float8 and
geometry tests are particularly prone to small differences across platforms, or
even with different compiler optimization options. 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.
d199 2
a200 1
Some systems display minus zero as -0, while others just show 0.
d202 1
a202 4
Some systems signal errors from pow() and exp() differently from the mechanism
expected by the current PostgreSQL code.

-------------------------------------------------------------------------------
d209 2
a210 2
pedantic as to use an ORDER BY for every single SELECT, and so their result row
orderings are not well-defined according to the letter of the SQL
d212 5
a216 4
executed on the same data by the same software, we usually get the same result
ordering on all platforms, and so the lack of ORDER BY isn't a problem. Some
queries do exhibit cross-platform ordering differences, however. (Ordering
differences can also be triggered by non-C locale settings.)
d220 9
a228 7
But please report it anyway, so that we can add an ORDER BY to that particular
query and thereby eliminate the bogus "failure" in future releases.

You might wonder why we don't order all the regression test queries explicitly
to get rid of this issue once and for all. The reason is that that would make
the regression tests less useful, not more, since they'd tend to exercise query
plan types that produce ordered results to the exclusion of those that don't.
d230 1
a230 1
-------------------------------------------------------------------------------
d234 3
a236 3
There is at least one case in the random test script that is intended to
produce random results. This causes random to fail the regression test once in
a while (perhaps once in every five to ten trials). Typing
d238 1
a238 1
  diff results/random.out expected/random.out
d241 3
a243 41
unless the random test always fails in repeated attempts. (On the other hand,
if the random test is *never* reported to fail even in many trials of the
regression tests, you probably *should* worry.)

-------------------------------------------------------------------------------

Platform-specific comparison files

Since some of the tests inherently produce platform-specific results, we have
provided a way to supply platform-specific result comparison files. Frequently,
the same variation applies to multiple platforms; rather than supplying a
separate comparison file for every platform, there is a mapping file that
defines which comparison file to use. So, to eliminate bogus test "failures"
for a particular platform, you must choose or make a variant result file, and
then add a line to the mapping file, which is "src/test/regress/resultmap".

Each line in the mapping file is of the form

  testname/platformpattern=comparisonfilename

The test name is just the name of the particular regression test module. The
platform pattern is a pattern in the style of the Unix tool "expr" (that is, a
regular expression with an implicit ^ anchor at the start). It is matched
against the platform name as printed by "config.guess" followed by :gcc or :cc,
depending on whether you use the GNU compiler or the system's native compiler
(on systems where there is a difference). The comparison file name is the name
of the substitute result comparison file.

For example: some systems using older time zone libraries fail to apply
daylight-saving corrections to dates before 1970, causing pre-1970 PDT times to
be displayed in PST instead. This causes a few differences in the "horology"
regression test. Therefore, we provide a variant comparison file, "horology-no-
DST-before-1970.out", which includes the results to be expected on these
systems. To silence the bogus "failure" message on HPUX platforms, "resultmap"
includes

  horology/.*-hpux=horology-no-DST-before-1970

which will trigger on any machine for which the output of "config.guess"
includes -hpux. Other lines in "resultmap" select the variant comparison file
for other platforms where it's appropriate.
@


1.18
log
@Doesn't seem to be much point in keeping this README up to date anymore,
since it's completely redundant with regress.sgml.  I think we agreed to
remove it awhile back, actually, but no one got around to doing it.
@
text
@d1 3
a3 1
REGRESSION TESTS
d6 20
a25 17
implementation in PostgreSQL. They test standard SQL operations as
well as the extended capabilities of PostgreSQL. The test suite was
originally developed by Jolly Chen and Andrew Yu, and was extensively
revised and repackaged by Marc Fournier and Thomas Lockhart. From
PostgreSQL 6.1 onward the regression tests are current for every
official release.

The regression test can be run against an already installed and
running server, or using a temporary installation within the build
tree.  Furthermore, there is a "parallel" and a "sequential" mode for
running the tests. The sequential method runs each test script in
turn, whereas the parallel method starts up multiple server processes
to run groups of tests in parallel. Parallel testing gives confidence
that interprocess communication and locking are working correctly. For
historical reasons, the sequential test is usually run against an
existing installation and the parallel method "stand-alone", but there
are technical reasons for this.
d27 1
a27 2
To run the regression tests after building but before installation,
type
d31 5
a35 5
in the top-level directory. (Or you can change to src/test/regress and
run the command there.) This will first build several auxiliary files,
such as platform-dependent "expected" files and some sample
user-defined trigger functions, and then run the test driver
script. At the end you should see something like
d38 1
a38 1
 All 76 tests passed.
d41 2
a42 2
or otherwise a note about what tests failed. See the section called
Test Evaluation below for more.
d52 1
d54 1
d71 2
a72 2
To run the tests after installation, initialize a data area and start
the server, then type
d80 2
d84 10
a93 11
Some properly installed and fully functional PostgreSQL installations
can "fail" some of these regression tests due to platform-specific
artifacts such as varying floating point representation and time zone
support. The tests are currently evaluated using a simple diff
comparison against the outputs generated on a reference system, so the
results are sensitive to small system differences. When a test is
reported as "failed", always examine the differences between expected
and actual results; you may well find that the differences are not
significant. Nonetheless, we still strive to maintain accurate reference
files across all supported platforms, so it can be expected that all
tests pass.
d96 7
a102 5
src/test/regress/results directory. The test script uses diff to
compare each output file against the reference outputs stored in the
src/test/regress/expected directory. Any differences are saved for
your inspection in src/test/regress/regression.diffs. (Or you can run
diff yourself, if you prefer.)
d106 8
a113 6
Some of the regression tests involve intentional invalid input
values. Error messages can come from either the PostgreSQL code or
from the host platform system routines. In the latter case, the
messages may vary between platforms, but should reflect similar
information. These differences in messages will result in a "failed"
regression test which can be validated by inspection.
d117 6
a122 7
The tests expect to run in plain "C" locale.  This should not cause any
problems when you run the tests against a temporary installation, since
the regression test driver takes care to start the server in C locale.
However, if you run the tests against an already-installed server that
is using non-C locale settings, you may see differences caused by
varying rules for string sort order, formatting of numeric and monetary
values, and so forth.
d125 7
a131 5
inspection.  However, in a locale that changes the rules for formatting
of numeric values (typically by swapping the usage of commas and
decimal points), entry of some data values will fail, resulting in
extensive differences later in the tests where the missing data values
are supposed to be used.
d135 6
d143 6
a148 6
(Berkeley, California) and there will be apparent failures if the
tests are not run with that time zone setting. The regression test
driver sets environment variable PGTZ to PST8PDT to ensure proper
results. However, your system must provide library support for the
PST8PDT time zone, or the time zone-dependent tests will fail. To
verify that your machine does have this support, type the following:
d154 2
a155 2
system may have returned the time in GMT. If the PST8PDT time zone is
not available, you can set the time zone rules explicitly:
d159 10
a168 15
There appear to be some systems which do not accept the recommended
syntax for explicitly setting the local time zone rules; you may need
to use a different PGTZ setting on such machines.

Some systems using older time zone libraries fail to apply
daylight-savings corrections to dates before 1970, causing pre-1970
PDT times to be displayed in PST instead. This will result in
localized differences in the test results.

Some of the queries in the "timestamp" test will fail if you run the
test on the day of a daylight-savings time changeover, or the day
before or after one. These queries assume that the intervals between
midnight yesterday, midnight today and midnight tomorrow are exactly
twenty-four hours -- which is wrong if daylight-savings time went into
or out of effect meanwhile.
d172 7
a178 8
Some of the tests involve computing 64-bit (double precision) numbers
from table columns. Differences in results involving mathematical
functions of double precision columns have been observed. The float8
and geometry tests are particularly prone to small differences across
platforms, or even with different compiler optimization options. 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.
d183 2
d188 10
a197 10
Oakland/Berkeley, CA street map. The map data is expressed as polygons
whose vertices are represented as pairs of double precision numbers
(decimal latitude 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 following:
d202 27
a228 1
Tuple ordering differences
d230 1
a230 23
You might see differences in which the same tuples are output in a
different order than what appears in the expected file.  In most cases
this is not, strictly speaking, a bug.  Most of the regression test
scripts are not so pedantic as to use an ORDER BY for every single
SELECT, and so their result tuple orderings are not well-defined
according to the letter of the SQL spec.  In practice, since we are
looking at the same queries being executed on the same data by the same
software, we usually get the same result ordering on all platforms, and
so the lack of ORDER BY isn't a problem.  Some queries do exhibit
cross-platform ordering differences, however.  (Ordering differences
can also be triggered by non-C locale settings.)

Therefore, if you see an ordering difference, it's not something to
worry about, unless the query does have an ORDER BY that your result
is violating.  But please report it anyway, so that we can add an
ORDER BY to that particular query and thereby eliminate the bogus
"failure" in future releases.

You might wonder why we don't ORDER all the regress test SELECTs to
get rid of this issue once and for all.  The reason is that that would
make the regression tests less useful, not more, since they'd tend
to exercise query plan types that produce ordered results to the
exclusion of those that don't.
d234 3
a236 4
There is at least one case in the "random" test script that is
intended to produce random results. This causes random to fail the
regression test once in a while (perhaps once in every five to ten
trials). Typing
d240 4
a243 48
should produce only one or a few lines of differences. You need not
worry unless the random test always fails in repeated attempts. (On
the other hand, if the random test is never reported to fail even in
many trials of the regress tests, you probably should worry.)

Platform-specific comparison files

Since some of the tests inherently produce platform-specific results,
we have provided a way to supply platform-specific result comparison
files.  Frequently, the same variation applies to multiple platforms;
rather than supplying a separate comparison file for every platform,
there is a mapping file that defines which comparison file to use. So,
to eliminate bogus test "failures" for a particular platform, you must
choose or make a variant result file, and then add a line to the
mapping file, which is "resultmap".

Each line in the mapping file is of the form

    testname/platformpattern=comparisonfilename

The test name is just the name of the particular regression test
module. The platform pattern is a pattern in the style of expr(1)
(that is, a regular expression with an implicit ^ anchor at the start).
It is matched against the platform name as printed by config.guess
followed by ":gcc" or ":cc", depending on whether you use the GNU compiler
or the system's native compiler (on systems where there is a difference).
The comparison file name is the name of the substitute result comparison
file.

For example: the int2 regress test includes a deliberate entry of a
value that is too large to fit in int2. The specific error message
that is produced is platform-dependent; our reference platform emits

    ERROR:  pg_atoi: error reading "100000": Numerical result out of range

but a fair number of other Unix platforms emit

    ERROR:  pg_atoi: error reading "100000": Result too large

Therefore, we provide a variant comparison file, int2-too-large.out,
that includes this spelling of the error message. To silence the bogus
"failure" message on HPPA platforms, resultmap includes

                int2/hppa=int2-too-large

which will trigger on any machine for which config.guess's output
begins with 'hppa'. Other lines in resultmap select the variant
comparison file for other platforms where it's appropriate.
@


1.17
log
@Discuss LOCALE differences as a reason for regression test failure.
@
text
@@


1.16
log
@Document tuple ordering differences as a possible cause of
regression test 'failures'.
@
text
@d34 1
a34 1
 All 75 tests passed.
d45 1
a45 1
     tests.
d70 3
a72 2
The server is expected to be running on the local host with the
default port number.
d77 10
a86 9
can "fail" some of these regression tests due to artifacts of floating
point representation and time zone support. The tests are currently
evaluated using a simple diff comparison against the outputs generated
on a reference system, so the results are sensitive to small system
differences. When a test is reported as "failed", always examine the
differences between expected and actual results; you may well find
that the differences are not significant. Nonetheless, we still strive
to maintain accurate reference files across all supported platforms,
so it can be expected that all tests pass.
d104 17
d199 2
a200 1
cross-platform ordering differences, however.
d203 2
a204 2
worry about (unless the query does have an ORDER BY that your result
is violating).  But please report it anyway, so that we can add an
@


1.15
log
@Tweak resultmap documentation, add to README too.
@
text
@d169 25
@


1.14
log
@* doc/src/sgml/regress.sgml: Update for new driver script.

* doc/src/sgml/installation.sgml: ditto.

* src/test/regress/README: Regenerate.

* doc/src/sgml/docguide.sgml: Explain how it was done.  Explain how
INSTALL and HISTORY are (now) generated.

* doc/src/sgml/Makefile: Implement HISTORY generation to be analoguous
to INSTALL.
@
text
@d196 1
a196 1
    testname/platformnamepattern=comparisonfilename
d199 7
a205 5
module. The platform name pattern is a pattern in the style of expr(1)
(that is, a regular expression with an implicit ^ anchor at the
start). It is matched against the platform name as printed by
config.guess. The comparison file name is the name of the substitute
result comparison file.
@


1.13
log
@Update platform-specific-expected-file support so that platforms can be
specified by regular-expression patterns.  Add some more files.
@
text
@d1 1
d3 89
a91 1
Introduction
d93 1
a93 3
  The PostgreSQL regression tests are a comprehensive set of tests for the
  SQL implementation embedded in PostgreSQL.  They test standard SQL
  operations as well as the extended capabilities of PostgreSQL.
d95 87
a181 4
  The regression tests were originally developed by Jolly Chen and Andrew Yu,
  and were extensively revised/repackaged by Marc Fournier and Thomas Lockhart.
  From PostgreSQL v6.1 onward the regression tests are current for every
  official release.
d183 1
a183 6
  Some properly installed and fully functional PostgreSQL installations
  can fail some of these regression tests due to artifacts of floating point
  representation and time zone support. The current tests are evaluated
  using a simple "diff" algorithm, and are sensitive to small system
  differences. For apparently failed tests, examining the differences
  may reveal that the differences are not significant.
d185 23
a207 1
Preparation
d209 1
a209 5
  To prepare for regression testing, do "make all" in the regression test
  directory.  This compiles a 'C' program with PostgreSQL extension functions
  into a shared library.  Localized SQL scripts and output-comparison
  files are also created for the tests that need them.  The localization
  replaces macros in the source files with absolute pathnames and user names.  
d211 1
a211 4
  Normally, the regression tests should be run as the postgres user since
  the 'src/test/regress' directory and sub-directories are owned by the
  postgres user. If you run the regression test as another user the
  'src/test/regress' directory tree must be writeable to that user.
d213 1
a213 32
  It was formerly necessary to run the postmaster with system time zone
  set to PST, but this is no longer required.  You can run the regression
  tests under your normal postmaster configuration.  The test script will
  set the PGTZ environment variable to ensure that timezone-dependent tests
  produce the expected results.

Directory Layout

  input/ .... .source files that are converted using 'make all' into
              some of the .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 contain what the results *actually* look
              like. Also used as temporary storage for table copy testing.

Running the regression test

  If you have previously run the regression test for a different Postgres
  release, make sure you have up-to-date comparison files by doing

        make clean all

  The regression test is invoked with the command:

        make runtest
d215 9
a223 176
  or you can do

	make runcheck

  which invokes a parallel form of the regress tests, and does not
  need an already-installed postmaster.  Instead, runcheck creates
  a temporary installation under the regress directory.

Comparing expected/actual output

  The results are in files in the ./results directory. These results
  can be compared with results in the ./expected directory using 'diff'.
  (The test script now does this for you, and leaves the differences
  in ./regression.diffs.)

  The files might not compare exactly. The following paragraphs attempt
  to explain the differences.

  Once the output files have been verified for a particular platform,
  it is possible to provide new platform-specific comparison files,
  so that future test runs won't report bogus "failures".  See
  'Platform-specific comparison files', below.

Error message differences

  Some of the regression tests involve intentional invalid input values.
  Error messages can come from either the Postgres code or from the host
  platform system routines. In the latter case, the messages may vary
  between platforms, but should reflect similar information. These
  differences in messages will result in a "failed" regression test which
  can be validated by inspection.

DATE/TIME differences

  Most of the date and time results are dependent on timezone environment.
  The reference files are generated for timezone PST8PDT (Berkeley,
  California) and there will be apparent failures if the tests are not
  run with that timezone setting.  The regression test driver sets
  environment variable PGTZ to PST8PDT to ensure proper results.

  There appear to be some systems which do not accept the recommended syntax
  for explicitly setting the local time zone rules; you may need to use
  a different PGTZ setting on such machines.

  Some systems using older timezone libraries fail to apply daylight-savings
  corrections to pre-1970 dates, causing pre-1970 PDT times to be displayed
  in PST instead.  This will result in localized differences in the test
  results.

FLOATING POINT differences

  Some of the tests involve computing 64-bit (FLOAT8) numbers 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.

  Some systems signal errors from pow() and exp() differently from
  the mechanism expected by the current Postgres code.

POLYGON differences

  Several of the tests involve operations on geographic data about the
  Oakland/Berkley CA street map. The map data is expressed as polygons
  whose vertices are represented as pairs of FLOAT8 numbers (decimal
  latitude 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 following:

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

Random differences

  There is at least one test case in random.out which is intended to produce
  random results. This causes random to fail the regression testing.
  Typing "diff results/random.out expected/random.out" should produce only
  one or a few lines of differences for this reason, but other floating
  point differences on dissimilar architectures might cause many more
  differences. See the release notes below.

The 'expected' files

  The ./expected/*.out files were adapted from the original monolithic
  'expected.input' file provided by Jolly Chen et al. Newer versions of these
  files generated on various development machines have been substituted after
  careful (?) inspection. Many of the development machines are running a
  Unix OS variant (FreeBSD, Linux, etc) on Ix86 hardware.

Platform-specific comparison files

  Since some of the tests inherently produce platform-specific results,
  we have provided a way to supply platform-specific result comparison
  files.  Frequently, the same variation applies to multiple platforms;
  rather than supplying a separate comparison file for every platform,
  there is a mapping file that defines which comparison file to use.
  So, to eliminate bogus test "failures" for a particular platform,
  you must choose or make a variant result file, and then add a line
  to the mapping file, which is "resultmap".

  Each line in the mapping file is of the form
		testname/platformnamepattern=comparisonfilename
  The test name is just the name of the particular regression test module.
  The platform name pattern is a pattern in the style of expr(1) (that is,
  a regular expression with an implicit ^ anchor at the start).  It is matched
  against the platform name as printed by config.guess.  The comparison
  file name is the name of the substitute result comparison file.

  For example: the int2 regress test includes a deliberate entry of a value
  that is too large to fit in int2.  The specific error message that is
  produced is platform-dependent; our reference platform emits
    ERROR:  pg_atoi: error reading "100000": Numerical result out of range
  but a fair number of other Unix platforms emit
    ERROR:  pg_atoi: error reading "100000": Result too large
  Therefore, we provide a variant comparison file, int2-too-large.out,
  that includes this spelling of the error message.  To silence the
  bogus "failure" message on HPPA platforms,  resultmap includes
		int2/hppa=int2-too-large
  which will trigger on any machine for which config.guess's output
  begins with 'hppa'.  Other lines in resultmap select the variant
  comparison file for other platforms where it's appropriate.

Current release notes (Thomas.Lockhart@@jpl.nasa.gov)

  The regression tests have been adapted and extensively modified for the
  v6.1 release of PostgreSQL.

  Three new data types (datetime, timespan, and circle) have been added to
  the native set of PostgreSQL types. Points, boxes, paths, and polygons
  have had their output formats made consistant across the data types.
  The polygon output in misc.out has only been spot-checked for correctness
  relative to the original regression output.

  PostgreSQL v6.1 introduces a new, alternate optimizer which uses "genetic"
  algorithms. These algorithms introduce a random behavior in the ordering
  of query results when the query contains multiple qualifiers or multiple
  tables (giving the optimizer a choice on order of evaluation). Several
  regression tests have been modified to explicitly order the results, and
  hence are insensitive to optimizer choices. A few regression tests are
  for data types which are inherently unordered (e.g. points and time
  intervals) and tests involving those types are explicitly bracketed with
  "set geqo to 'off'" and "reset geqo".

  The interpretation of array specifiers (the curly braces around atomic
  values) appears to have changed sometime after the original regression
  tests were generated. The current ./expected/*.out files reflect this
  new interpretation, which may not be correct!

  The float8 regression test fails on at least some platforms. This is due
  to differences in implementations of pow() and exp() and the signaling
  mechanisms used for overflow and underflow conditions.

  The "random" results in the random test should cause the "random" test
  to be "failed", since the regression tests are evaluated using a simple
  diff. However, "random" does not seem to produce random results on my 
  test machine (Linux/gcc/i686).

Sample timing results

  Timing under Linux 2.0.27 seems to have a roughly 5% variation from run
  to run, presumably due to the timing vagaries of multitasking systems.

  Time   System
  06:12  Pentium Pro 180, 32MB, Linux 2.0.30, gcc 2.7.2 -O2 -m486
  12:06  P-100, 48MB, Linux 2.0.29, gcc
  39:58  Sparc IPC 32MB, Solaris 2.5, gcc 2.7.2.1 -O -g
@


1.12
log
@New scheme for managing platform-specific regress test result files.
Instead of hard-wiring one result file per platform, there is a map file
'resultmap' that says which one to use --- a lot like template/.similar.
I have only created entries in resultmap for my own platform (HPUX) so
far; feel free to add lines for other platforms.
@
text
@d6 1
a6 1
  operations as well as the extensibility capabilities of PostgreSQL.
d10 2
d22 3
a24 3
  To prepare for regression testing, do "make all".  This compiles
  a 'C' program with PostgreSQL extension functions into a shared library
  in the current directory.  Localized SQL scripts and output-comparison
d28 5
a73 5
  Normally, the regression tests should be run as the postgres user since
  the 'src/test/regress' directory and sub-directories are owned by the
  postgres user. If you run the regression test as another user the
  'src/test/regress' directory tree must be writeable to that user.

d177 1
a177 1
		testname/platformname=comparisonfilename
d179 4
a182 3
  The platform name is the platform name as printed by config.guess (in
  the toplevel PostgreSQL src directory), or any prefix of it.  The
  comparison file name is the name of the substitute result comparison file.
@


1.11
log
@Update README to reflect the fact that you don't have to
run the regression tests with a special postmaster TZ setting anymore.
Correct a few typos too.
@
text
@d5 5
a9 7
  SQL implementation embedded in PostgreSQL developed by Jolly Chen and
  Andrew Yu. It tests standard SQL operations as well as the extensibility
  capabilities of PostgreSQL.

  These tests have recently been revised by Marc Fournier and Thomas Lockhart
  to become current for PostgreSQL v6.1. The tests are now packaged as
  functional units and should be easier to run and easier to interpret.
d20 5
a24 6
  The regression test is invoked 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 output file templates are massaged into the
  ./expected/*.out files.  The localization replaces macros in the source
  files with absolute pathnames and user names.
d45 1
a45 1
  results/ .. .out files that represent what the results *actually* look
d50 2
a51 2
  If you have prevously invoked the regression test, clean up the
  working directory with:
d53 1
a53 1
        make clean
d57 5
a61 1
        make all runtest
d63 5
a67 1
  Normally, the regression test should be run as the pg_superuser since
d69 2
a70 2
  pg_superuser. If you run the regression test as another user the
  'src/test/regress' directory tree should be writeable to that user.
d82 5
a95 14
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 'misc.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.

d162 32
@


1.10
log
@Update linux_i386 fix.
@
text
@d29 5
a33 15
  The postmaster should be invoked with the system time zone set for
  Berkeley, California. On many systems, this can be accomplished by
  setting the TZ environment variable before starting the postmaster
  (for csh/bash; use set/export for some other shells):

    setenv TZ PST8PDT
    date
    /usr/local/pgsql/bin/postmaster -s

  The "date" command above should have returned the current system time
  in the PST8PDT time zone. If the PST8PDT database is not available, then
  your system may have returned the time in GMT. If the PST8PDT time zone
  is not available, you can set the time zone rules explicitly:

    setenv TZ PST8PDT7,M04.01.0,M10.05.03
d71 3
d102 14
a115 12
  On many supported platforms, you can force PostgreSQL to believe that it
  is running in the same time zone as Berkeley, California. See details in
  the section on how to run the regression tests.

  If you do not explicitly set your time zone environment to PST8PDT, then
  most of the date and time results will reflect your local time zone and
  will fail the regression testing.

  There appears to be some systems which do not accept the recommended syntax
  for explicitly setting the local time zone rules. Some systems using the
  public domain time zone package exhibit minor problems with pre-1970 PDT
  times, representing them in PST instead.
d119 1
a119 1
  Some of the tests involve computing 64-bit (FLOAT8) number from table
d135 1
a135 1
  Several of the tests involve operations on geographic date about the
d145 1
a145 1
  statements where these problems occur are the folowing:
@


1.9
log
@Update to suggest using PST8PDT time zone rather than full time zone string.
Include section on error message differences.
@
text
@a171 11
  The original 'expected.input' file was created on a SPARC Solaris 2.4
  system using the 'postgres5-1.02a5.tar.gz' source tree. It was compared
  with a file created on an I386 Solaris 2.4 system and the differences
  were only in the floating point polygons in the 3rd digit to the right
  of the decimal point. (see below)

  The original 'sample.regress.out' file was 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.

@


1.8
log
@Spiff up description of the regression tests and outcomes.
@
text
@d9 2
a10 2
  These tests have recently been revised by Marc Fournier and others to
  become current for PostgreSQL v6.1. The tests are now packaged as
d14 1
a14 1
  can fail these regression tests due to artifacts of floating point
d30 1
a30 1
  Berkeley, California. On some systems, this can be accomplished by
d34 9
a43 1
    /usr/local/pgsql/bin/postmaster -s
d84 9
d113 1
a113 1
  If you do not explicitly set your time zone environment to PST/PDT, then
d117 4
a120 2
  There appear to be some systems which do not accept the same syntax for
  setting the local time zone.
d190 3
a192 5
  have had their output formats improved, but the old-style input formats
  are accepted by v6.1. The source data files have not been updated to the
  new formats, but should be for the next release. The polygon output in
  misc.out has only been spot-checked for correctness relative to the
  original regression output.
d224 1
a224 1
  06:12  Pentium Pro 180, 32MB, Linux 2.0.27, gcc 2.7.2 -O2 -m486
@


1.7
log
@Update to current information for upcoming v6.1 production release.
@
text
@d14 5
a18 2
  can fail these regression tests due to artifacts of the genetic optimizer.
  See the v6.1-specific release notes in this document for further details.
d64 2
a65 2
  Normally, the regression test should be run as the pg_superuser as the
  'src/test/regress' directory and sub-directories are owned by the
d71 4
a74 4
  The results are in the files in the ./results directory. These
  results can be compared with results in the ./expected directory
  using 'diff'. The files might not compare exactly. The following
  paragraphs attempt to explain the differences.
d100 3
d116 3
d196 14
a209 3
  The "random" results in the random test do not seem to produce random
  results on my test machine (Linux/gcc/i686).

@


1.6
log
@Massive regression test patches from Thomas *woo hoo!*
@
text
@d87 5
a91 1
TIME differences
d93 3
a95 8
  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.
a126 12
DATE/TIME differences

  On many supported platforms, you can force PostgreSQL to believe that it
  is running in the same time zone as Berkeley, California. See details in
  the section on how to run the regression tests.

  The Makefile attempts to adjust for timezone differences, but it is
  not possible to totally 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.

d129 3
a131 3
  There is at least one test case in misc.out which is intended to produce
  random results. This causes misc to fail the regression testing.
  Typing "diff results/misc.out expected/misc.out" should produce only
d134 1
a134 1
  differences.
d155 1
a155 5
Current release notes

  There are no release notes for PostgreSQL v6.0.

v6.1beta release notes
d168 9
a176 11
  To get consistant results from the regression tests, compile the PostgreSQL
  backend with the genetic optimizer (GEQ) turned off. The genetic algorithms
  introduce a random behavior in the output ordering which causes the
  simple "diff" implementation of the tests to fail. To turn off the genetic
  optimizer, edit the src/include/config.h file and comment-out the line
  containing "#define GEQ", then do a "make clean install" to regenerate
  the backend. Existing v6.1 databases are not affected by the choice of
  optimizer, so there is no need to reload after changing the optimizer.
  The new genetic optimizer has very nice performance with many-table joins,
  so you may want to make sure to re-enable it and reinstall the code after
  you have concluded your regression testing.
a177 1
XXX update this for the production release - tgl 97/04/26
d183 6
a188 7
XXX update this for the production release - tgl 97/04/26
  The float8 regression test fails. This may be due to the parser continuing
  rather than aborting when given invalid constants for input values.

XXX update this for the production release - tgl 97/04/26
  Regression tests involving indexed tables fail in at least some environments.
  This may indicate a problem with the current index code.
@


1.5
log
@Slight mods to explain (or try to) the new regression tests
@
text
@d5 2
a6 2
  SQL implementation embeded in PostgreSQL developed by Jolly Chen and
  Andrew Yu. It tests standard SQL operations as well as the extensability
d9 8
d19 1
a19 1
  The regression test is invoked thru by the 'make' command which compiles
d22 2
a23 2
  the current directory. The 'expected.input' file is massaged into the
  'expected.out' file.  The localization replaces macros in the source
d26 8
d37 1
a37 1
              .sql files in the 'sql' subdirectory
d48 1
a48 1
              like
d64 1
a64 1
  'src/test/regress' directory should be writeable to that user.
d68 4
a71 4
  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.
d81 1
a81 1
  The following SQL statements in 'regress.out' have shown this behavior:
d115 2
a116 2
  whose verticies are represened as pairs of FLOAT8 numbers (decimal
  lattitude and longitude). Initially, some tables are created and
d130 4
d135 1
a135 1
  totally possible to eliminate them.  People outside North America
d140 8
a147 1
--------[ old stuff that needs to be rewritten ]-----
d149 1
a149 1
The 'expected.input' file and the 'sample.regress.out' file
d151 8
a158 2
  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
d160 1
a160 1
  are only in the floating point polygons in the 3rd digit to the right
d163 1
a163 1
  The 'sample.regress.out' file is from the postgres-1.01 release
d167 43
@


1.4
log
@Change Postgres95 to PostgreSQL

The whole file needs updating, but will work on that after finishing
with the splits
@
text
@d18 4
a21 1
The 'expected.input' file and the 'sample.regress.out' file
d23 2
a24 5
  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)
d26 1
a26 4
  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.
d28 2
a29 1
Running the regression test
d31 2
a32 1
  Change directory to the regression test directory:
d34 1
a34 1
        cd ...../src/test/regress
d45 1
a45 1
  Normally, the regression test should be run as the 'postgres' user as the
d47 1
a47 1
  'postgres' user. If you run the regression test as another user the
d120 14
@


1.3
log
@Reduce regression diff size with timezone changes and cleanup.
@
text
@d4 2
a5 2
  The Postgres95 regression tests are a comprehensive set of tests for the
  SQL implementation embeded in Postgres95 developed by Jolly Chen and
d7 1
a7 1
  capabilities of Postgres95.
d12 1
a12 1
  a 'c' program with Postgres95 extension functions into a shared library
d60 1
a60 1
  There are several places where Postgres95 OID (object identifiers) appear
d62 1
a62 1
  by the Postgres95 backend whenever a table row is inserted or updated.
@


1.2
log
@Okay...*last* commit, now to create a release...

README file for regresssion tests from Dr. George
@
text
@d13 3
a15 3
  in the 'obj' directory.  Localised shell scripts are also created in
  the 'obj' directory. The 'expected.input' file is massaged into the
  'obj/expected.out' file.  The localization replaces macros in the source
d49 1
a49 1
  'src/test/regress/obj' directory should be writeable to that user.
d53 2
a54 2
  The results are in the file 'obj/regress.out' which can be compared
  with the 'obj/expected.out' file using 'diff'. The files will NOT
d112 9
@


1.1
log
@An actual README file for the regression tests

Submitted by: Dr. George
@
text
@a0 14
From scrappy@@ki.net Wed Jul 31 18:12:17 1996
Status: RO
X-Status: 
Received: from daemun.ilt.com ([204.247.102.21]) by ki.net (8.7.5/8.7.5) with ESMTP id SAA22940 for <scrappy@@ki.net>; Wed, 31 Jul 1996 18:12:13 -0400 (EDT)
Received: from venus (venus [199.26.203.13]) by daemun.ilt.com (8.7.5/8.7.3) with SMTP id PAA27566 for <scrappy@@ki.net>; Wed, 31 Jul 1996 15:11:27 -0700 (PDT)
Received: by venus (4.1/ILT-1.1)
	id AA01608; Wed, 31 Jul 96 15:11:22 PDT
Date: Wed, 31 Jul 96 15:11:22 PDT
From: drgeorge@@ilt.com (Dr_George_D_Detlefsen)
Message-Id: <9607312211.AA01608@@venus>
To: scrappy@@ki.net
Subject: src/test/regress/README

src/test/regress/README
@
