From b7c716ce3c1e6a08bf75d17586c3ef25c8422d7e Mon Sep 17 00:00:00 2001 From: chriskl Date: Thu, 24 Feb 2005 09:41:58 +0000 Subject: [PATCH] Fix using schema enabled dump on non-schema enabled backend --- HISTORY | 1 + dbexport.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index 7f61da18..ecb1d747 100644 --- a/HISTORY +++ b/HISTORY @@ -20,6 +20,7 @@ Bugs * Fix timeouts on long running operations (Adrian Nida) * Allow Multiline character and character varying editing and inserting * Add automatic browser language selection for all languages +* Fix using schema enabled dump on non-schema enabled backend Translations * Japanese from Tadashi Jokagi diff --git a/dbexport.php b/dbexport.php index a670b014..1b2aae60 100644 --- a/dbexport.php +++ b/dbexport.php @@ -3,7 +3,7 @@ * Does an export of a database or a table (via pg_dump) * to the screen or as a download. * - * $Id: dbexport.php,v 1.17 2005/02/09 11:26:24 chriskl Exp $ + * $Id: dbexport.php,v 1.18 2005/02/24 09:41:59 chriskl Exp $ */ // Prevent timeouts on large exports @@ -79,7 +79,11 @@ // then.. if (((float) $version[1]) >= 7.4) { $cmd .= " -t " . $misc->escapeShellArg($_REQUEST['table']); - $cmd .= " -n " . $misc->escapeShellArg($_REQUEST['schema']); + // Even though they're using a schema-enabled pg_dump, the backend database + // may not support schemas. + if ($data->hasSchemas()) { + $cmd .= " -n " . $misc->escapeShellArg($_REQUEST['schema']); + } } else { // This is an annoying hack needed to work around a bug in dumping -- 2.39.5