diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2022-02-08 15:30:38 -0500 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2022-02-08 15:30:38 -0500 |
| commit | cc50080a828dd4791b43539f5a0f976e535d147c (patch) | |
| tree | 787184da35163d8be525b7f84af85083e50d152a /src/test/regress/expected/varchar.out | |
| parent | ba15f16107bea8a93edc505f3013cd7df4ac90fc (diff) | |
| download | postgresql-cc50080a828dd4791b43539f5a0f976e535d147c.tar.gz | |
Rearrange core regression tests to reduce cross-script dependencies.
The idea behind this patch is to make it possible to run individual
test scripts without running the entire core test suite. Making all
the scripts completely independent would involve a massive rewrite,
and would probably be worse for coverage of things like concurrent DDL.
So this patch just does what seems practical with limited changes.
The net effect is that any test script can be run after running
limited earlier dependencies:
* all scripts depend on test_setup
* many scripts depend on create_index
* other dependencies are few in number, and are documented in
the parallel_schedule file.
To accomplish this, I chose a small number of commonly-used tables
and moved their creation and filling into test_setup. Later scripts
are expected not to modify these tables' data contents, for fear of
affecting other scripts' results. Also, our former habit of declaring
all C functions in one place is now gone in favor of declaring them
where they're used, if that's just one script, or in test_setup if
necessary.
There's more that could be done to remove some of the remaining
inter-script dependencies, but significantly more-invasive changes
would be needed, and at least for now it doesn't seem worth it.
Discussion: https://postgr.es/m/1114748.1640383217@sss.pgh.pa.us
Diffstat (limited to 'src/test/regress/expected/varchar.out')
| -rw-r--r-- | src/test/regress/expected/varchar.out | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/test/regress/expected/varchar.out b/src/test/regress/expected/varchar.out index da23ae810b..f1a8202d9f 100644 --- a/src/test/regress/expected/varchar.out +++ b/src/test/regress/expected/varchar.out @@ -1,7 +1,11 @@ -- -- VARCHAR -- -CREATE TABLE VARCHAR_TBL(f1 varchar(1)); +-- +-- Build a table for testing +-- (This temporarily hides the table created in test_setup.sql) +-- +CREATE TEMP TABLE VARCHAR_TBL(f1 varchar(1)); INSERT INTO VARCHAR_TBL (f1) VALUES ('a'); INSERT INTO VARCHAR_TBL (f1) VALUES ('A'); -- any of the following three input formats are acceptable @@ -93,13 +97,11 @@ DROP TABLE VARCHAR_TBL; -- -- Now test longer arrays of char -- -CREATE TABLE VARCHAR_TBL(f1 varchar(4)); -INSERT INTO VARCHAR_TBL (f1) VALUES ('a'); -INSERT INTO VARCHAR_TBL (f1) VALUES ('ab'); -INSERT INTO VARCHAR_TBL (f1) VALUES ('abcd'); +-- This varchar_tbl was already created and filled in test_setup.sql. +-- Here we just try to insert bad values. +-- INSERT INTO VARCHAR_TBL (f1) VALUES ('abcde'); ERROR: value too long for type character varying(4) -INSERT INTO VARCHAR_TBL (f1) VALUES ('abcd '); SELECT * FROM VARCHAR_TBL; f1 ------ |
