postgis.git / summary / log / commit / refs

commit    463539fc0938ee334fba5cbdf1d78ea022264bf1
Author:   Regina Obe <lr@pcorp.us>
Date:     Sun Jun 27 16:19:22 2021 +0000

    --tiger option to install postgis_tiger_extension


regress/run_test.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/regress/run_test.pl b/regress/run_test.pl index 938439c69..01b735bdb 100755 --- a/regress/run_test.pl +++ b/regress/run_test.pl @@ -61,6 +61,7 @@ my $OPT_NODROP = 0; my $OPT_NOCREATE = 0; my $OPT_UPGRADE = 0; my $OPT_DUMPRESTORE = 0; +my $OPT_WITH_TIGER = 0; my $OPT_WITH_TOPO = 0; my $OPT_WITH_RASTER = 0; my $OPT_WITH_SFCGAL = 0; @@ -85,6 +86,7 @@ GetOptions ( 'upgrade-path=s' => \$OPT_UPGRADE_PATH, 'dumprestore' => \$OPT_DUMPRESTORE, 'nocreate' => \$OPT_NOCREATE, + 'tiger' => \$OPT_WITH_TIGER, 'topology' => \$OPT_WITH_TOPO, 'raster' => \$OPT_WITH_RASTER, 'sfcgal' => \$OPT_WITH_SFCGAL, @@ -537,6 +539,7 @@ Options: --schema where to install/find PostGIS (relocatable) PostGIS (defaults to "public") --raster load also raster extension + --tiger load also tiger_geocoder extension --topology load also topology extension --sfcgal use also sfcgal backend --clean cleanup test logs on exit @@ -1374,6 +1377,23 @@ sub prepare_spatial_extensions } } + if ( $OPT_WITH_TIGER ) + { + my $sql = "CREATE EXTENSION postgis_tiger_geocoder CASCADE"; + if ( $OPT_UPGRADE_FROM ) { + $sql .= " VERSION '" . $OPT_UPGRADE_FROM . "'"; + } + + print "Preparing db '${DB}' using: ${sql}\n"; + + $cmd = "psql $psql_opts -c \"" . $sql . "\" $DB >> $REGRESS_LOG 2>&1"; + $rv = system($cmd); + if ( $rv ) { + fail "Error encountered creating EXTENSION POSTGIS_TIGER_GEOCODER", $REGRESS_LOG; + die; + } + } + if ( $OPT_WITH_RASTER && ( # NOTE: this code is assuming that the default version # (!$OPT_UPGRADE_FROM) has split raster extension [parent: 42c498fb7479]