Mute notices from postgresql during setup

They are mostly warnings about tables that do not exists. This
is intentional and would only confuse the casual user.
This commit is contained in:
Sarah Hoffmann
2018-08-23 21:14:34 +02:00
parent c7e7d5e980
commit 1ee636461c
2 changed files with 4 additions and 1 deletions

View File

@@ -185,6 +185,10 @@ function runSQLScript($sScript, $bfatal = true, $bVerbose = false, $bIgnoreError
fail('unable to start pgsql');
}
if (!$bVerbose) {
fwrite($ahPipes[0], "set client_min_messages to WARNING;");
}
while (strlen($sScript)) {
$iWritten = fwrite($ahPipes[0], $sScript);
if ($iWritten <= 0) break;

View File

@@ -440,7 +440,6 @@ if ($aCMDResult['load-data'] || $aCMDResult['all']) {
// PGSQL_EMPTY_QUERY, PGSQL_COMMAND_OK, PGSQL_TUPLES_OK,
// PGSQL_COPY_OUT, PGSQL_COPY_IN, PGSQL_BAD_RESPONSE,
// PGSQL_NONFATAL_ERROR and PGSQL_FATAL_ERROR
echo 'Query result ' . $i . ' is: ' . $resultStatus . "\n";
if ($resultStatus != PGSQL_COMMAND_OK && $resultStatus != PGSQL_TUPLES_OK) {
$resultError = pg_result_error($hPGresult);
echo '-- error text ' . $i . ': ' . $resultError . "\n";