summaryrefslogtreecommitdiff
path: root/src/test/locale
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2021-05-07 20:17:42 +1200
committerThomas Munro <tmunro@postgresql.org>2021-05-07 21:10:11 +1200
commitec48314708262d8ea6cdcb83f803fc83dd89e721 (patch)
treef5b7c82ea571ce78aaa355095dd588dce07349ff /src/test/locale
parenta288d94c91e345ebeb10ac30f247270c8c8e380a (diff)
downloadpostgresql-ec48314708262d8ea6cdcb83f803fc83dd89e721.tar.gz
Revert per-index collation version tracking feature.
Design problems were discovered in the handling of composite types and record types that would cause some relevant versions not to be recorded. Misgivings were also expressed about the use of the pg_depend catalog for this purpose. We're out of time for this release so we'll revert and try again. Commits reverted: 1bf946bd: Doc: Document known problem with Windows collation versions. cf002008: Remove no-longer-relevant test case. ef387bed: Fix bogus collation-version-recording logic. 0fb0a050: Hide internal error for pg_collation_actual_version(<bad OID>). ff942057: Suppress "warning: variable 'collcollate' set but not used". d50e3b1f: Fix assertion in collation version lookup. f24b1569: Rethink extraction of collation dependencies. 257836a7: Track collation versions for indexes. cd6f479e: Add pg_depend.refobjversion. 7d1297df: Remove pg_collation.collversion. Discussion: https://postgr.es/m/CA%2BhUKGLhj5t1fcjqAu8iD9B3ixJtsTNqyCCD4V0aTO9kAKAjjA%40mail.gmail.com
Diffstat (limited to 'src/test/locale')
-rw-r--r--src/test/locale/.gitignore1
-rw-r--r--src/test/locale/Makefile7
-rw-r--r--src/test/locale/t/001_index.pl67
3 files changed, 0 insertions, 75 deletions
diff --git a/src/test/locale/.gitignore b/src/test/locale/.gitignore
index 64e1bf2a80..620d3df425 100644
--- a/src/test/locale/.gitignore
+++ b/src/test/locale/.gitignore
@@ -1,2 +1 @@
/test-ctype
-/tmp_check/
diff --git a/src/test/locale/Makefile b/src/test/locale/Makefile
index 673e14dcd0..7ba096b542 100644
--- a/src/test/locale/Makefile
+++ b/src/test/locale/Makefile
@@ -4,7 +4,6 @@ subdir = src/test/locale
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
-export with_icu
PROGS = test-ctype
DIRS = de_DE.ISO8859-1 gr_GR.ISO8859-7 koi8-r koi8-to-win1251
@@ -21,9 +20,3 @@ clean distclean maintainer-clean:
# These behave like installcheck targets.
check-%: all
@$(MAKE) -C `echo $@ | sed 's/^check-//'` test
-
-check:
- $(prove_check)
-
-installcheck:
- $(prove_installcheck)
diff --git a/src/test/locale/t/001_index.pl b/src/test/locale/t/001_index.pl
deleted file mode 100644
index a67f78cb71..0000000000
--- a/src/test/locale/t/001_index.pl
+++ /dev/null
@@ -1,67 +0,0 @@
-use strict;
-use warnings;
-
-use Config;
-use PostgresNode;
-use TestLib;
-use Test::More;
-
-if ($ENV{with_icu} eq 'yes')
-{
- plan tests => 10;
-}
-else
-{
- plan skip_all => 'ICU not supported by this build';
-}
-
-#### Set up the server
-
-note "setting up data directory";
-my $node = get_new_node('main');
-$node->init(extra => [ '--encoding=UTF8' ]);
-
-$ENV{PGHOST} = $node->host;
-$ENV{PGPORT} = $node->port;
-$node->start;
-
-sub test_index
-{
- my ($err_like, $err_comm) = @_;
- my ($ret, $out, $err) = $node->psql('postgres', "SELECT * FROM icu1");
- is($ret, 0, 'SELECT should succeed.');
- like($err, $err_like, $err_comm);
-}
-
-$node->safe_psql('postgres', 'CREATE TABLE icu1(val text);');
-$node->safe_psql('postgres', 'CREATE INDEX icu1_fr ON icu1 (val COLLATE "fr-x-icu");');
-
-test_index(qr/^$/, 'No warning should be raised');
-
-# Simulate different collation version
-$node->safe_psql('postgres',
- "UPDATE pg_depend SET refobjversion = 'not_a_version'"
- . " WHERE refobjversion IS NOT NULL"
- . " AND objid::regclass::text = 'icu1_fr';");
-
-test_index(qr/index "icu1_fr" depends on collation "fr-x-icu" version "not_a_version", but the current version is/,
- 'Different collation version warning should be raised.');
-
-$node->safe_psql('postgres', 'ALTER INDEX icu1_fr ALTER COLLATION "fr-x-icu" REFRESH VERSION;');
-
-test_index(qr/^$/, 'No warning should be raised');
-
-# Simulate different collation version
-$node->safe_psql('postgres',
- "UPDATE pg_depend SET refobjversion = 'not_a_version'"
- . " WHERE refobjversion IS NOT NULL"
- . " AND objid::regclass::text = 'icu1_fr';");
-
-test_index(qr/index "icu1_fr" depends on collation "fr-x-icu" version "not_a_version", but the current version is/,
- 'Different collation version warning should be raised.');
-
-$node->safe_psql('postgres', 'REINDEX TABLE icu1;');
-
-test_index(qr/^$/, 'No warning should be raised');
-
-$node->stop;