postgis.git / summary / log / commit / refs
commit aa3f0ceeb0ad00f46d37656fa6931bfdd785a609
Author: Sandro Santilli <strk@kbt.io>
Date: Fri Apr 21 19:35:56 2023 +0000
Force C locale and libc provider in regress test db with PG15+
This is probably a workaround to a bug in PostgreSQL 16, but it
feels like the smallest change to fix #5375
regress/run_test.pl | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/regress/run_test.pl b/regress/run_test.pl
index 543eb7d64..3f143f225 100755
--- a/regress/run_test.pl
+++ b/regress/run_test.pl
@@ -285,6 +285,10 @@ psql -tAc "
" template1
`));
+my $pgvernum = `
+psql -tAc "SELECT current_setting('server_version_num')" template1
+`;
+
my $defextver = `
psql -XtAc "
SELECT default_version
@@ -323,7 +327,6 @@ else
}
}
-my $pgvernum = sql("SELECT current_setting('server_version_num')");
my $libver = sql("select postgis_lib_version()");
if ( ! $libver )
@@ -1441,7 +1444,11 @@ sub count_postgis_objects
##################################################################
sub create_db
{
- my $createcmd = "createdb --encoding=UTF-8 --template=template0 --lc-collate=C $DB > $REGRESS_LOG";
+ my $createcmd = "createdb --encoding=UTF-8 --template=template0 --lc-collate=C";
+ if ( $pgvernum ge 150000 ) {
+ $createcmd .= " --locale=C --locale-provider=libc"
+ }
+ $createcmd .= " $DB > $REGRESS_LOG";
return not system($createcmd);
}
[parent: 8d074fc3a2c7]