diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml index 6a3ac95558..59083eca1a 100644 --- a/doc/src/sgml/regress.sgml +++ b/doc/src/sgml/regress.sgml @@ -194,6 +194,48 @@ gmake standbycheck Additional automated testing may be available in later releases. + + + Locale and encoding + + + By default, the tests against a temporary installation use the + locale defined in the current environment and the corresponding + database encoding as determined by initdb. It + can be useful to test different locales by setting the appropriate + environment variables, for example: + +gmake check LANG=C +gmake check LC_COLLATE=en_US.utf8 LC_CTYPE=fr_CA.utf8 + + For implementation reasons, setting LC_ALL does not + work for this purpose; all the other locale-related environment + variables do work. + + + + When testing against an existing installation, the locale is + determined by the existing database cluster and cannot be set + separately for the test run. + + + + You can also choose the database encoding explicitly by setting + the variable MULTIBYTE, for example: + +gmake check LANG=C MULTIBYTE=EUC_JP + + Setting the database encoding this way typically only makes sense + if the locale is C; otherwise the encoding is chosen automatically + from the locale, and specifying an encoding that does not match + the locale will result in an error. + + + + The encoding can be set for tests against a temporary or an + existing installation. + + diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile index cb67e5a12a..15b9ec49f7 100644 --- a/src/test/regress/GNUmakefile +++ b/src/test/regress/GNUmakefile @@ -23,9 +23,6 @@ endif # where to find psql for testing an existing installation PSQLDIR = $(bindir) -# default encoding -MULTIBYTE = SQL_ASCII - # maximum simultaneous connections for parallel tests MAXCONNOPT = ifdef MAX_CONNECTIONS @@ -141,7 +138,7 @@ tablespace-setup: ## Run tests ## -pg_regress_call = ./pg_regress --inputdir=$(srcdir) --dlpath=. --multibyte=$(MULTIBYTE) $(NOLOCALE) +pg_regress_call = ./pg_regress --inputdir=$(srcdir) --dlpath=. $(if $(MULTIBYTE),--multibyte=$(MULTIBYTE)) $(NOLOCALE) check: all tablespace-setup $(pg_regress_call) --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(TEMP_CONF)