Fix using schema enabled dump on non-schema enabled backend
authorchriskl <chriskl>
Thu, 24 Feb 2005 09:41:58 +0000 (09:41 +0000)
committerchriskl <chriskl>
Thu, 24 Feb 2005 09:41:58 +0000 (09:41 +0000)
HISTORY
dbexport.php

diff --git a/HISTORY b/HISTORY
index 7f61da1805239b76fc7c98d4916c9f1205e0b41d..ecb1d74744486a44e67315c23031b21ebe57037a 100644 (file)
--- 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
index a670b0141d93b60bd0a63a03368a8133d89ac007..1b2aae6096883d35cbc45b1126eacf5f4e815630 100644 (file)
@@ -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
                        // 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