When creating table with WITHOUT OIDS not checked, behaviour was left to the db defau...
authorGuillaume (ioguix) de Rorthais <ioguix@free.fr>
Fri, 30 Oct 2009 13:06:06 +0000 (14:06 +0100)
committerGuillaume (ioguix) de Rorthais <ioguix@free.fr>
Fri, 30 Oct 2009 13:06:06 +0000 (14:06 +0100)
support it.

classes/database/Postgres.php
tables.php

index ded8bfca6d568dbdfeb5060ee87526e84ec2ea72..68e7a7cab5da704c80ee6d6740dd08289a1daa62 100755 (executable)
@@ -1406,12 +1406,10 @@ class Postgres extends ADODB_base {
                */
 
                // Handle WITHOUT OIDS
-               if ($this->hasWithoutOIDs()) {
-                       if ($this->hasObjectID($table))
-                               $sql .= " WITH OIDS";
-                       else
-                               $sql .= " WITHOUT OIDS";
-               }
+               if ($this->hasObjectID($table))
+                       $sql .= " WITH OIDS";
+               else
+                       $sql .= " WITHOUT OIDS";
 
                $sql .= ";\n";
 
@@ -1727,8 +1725,10 @@ class Postgres extends ADODB_base {
                $sql .= ")";
 
                // WITHOUT OIDS
-               if ($this->hasWithoutOIDs() && $withoutoids)
+               if ($withoutoids)
                        $sql .= ' WITHOUT OIDS';
+               else
+                       $sql .= ' WITH OIDS';
 
                // Tablespace
                if ($this->hasTablespaces() && $tablespace != '') {
@@ -7829,7 +7829,6 @@ class Postgres extends ADODB_base {
        function hasVariables() { return true; }
        function hasViewColumnRename() { return true; }
        function hasVirtualTransactionId() { return true; }
-       function hasWithoutOIDs() { return true; }
        function hasAlterDatabase() { return $this->hasAlterDatabaseRename(); }
        function hasDatabaseCollation() { return true; }
        function hasMagicTypes() { return true; }
index 23a034716f57ddc5fe9ad9aad45b70b721cb8da2..d91fd6bf355f34eb9c3cc72661a2f02ebde5024a 100644 (file)
                                echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strnumcols']}</th>\n";
                                echo "\t\t<td class=\"data\"><input name=\"fields\" size=\"5\" maxlength=\"{$data->_maxNameLen}\" value=\"",
                                        htmlspecialchars($_REQUEST['fields']), "\" /></td>\n\t</tr>\n";
-                               if ($data->hasWithoutOIDs()) {
-                                       echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['stroptions']}</th>\n";
-                                       echo "\t\t<td class=\"data\"><label for=\"withoutoids\"><input type=\"checkbox\" id=\"withoutoids\" name=\"withoutoids\"", isset($_REQUEST['withoutoids']) ? ' checked="checked"' : '', " />WITHOUT OIDS</label></td>\n\t</tr>\n";
-                               }
+                               echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['stroptions']}</th>\n";
+                               echo "\t\t<td class=\"data\"><label for=\"withoutoids\"><input type=\"checkbox\" id=\"withoutoids\" name=\"withoutoids\"", isset($_REQUEST['withoutoids']) ? ' checked="checked"' : '', " />WITHOUT OIDS</label></td>\n\t</tr>\n";
 
                                // Tablespace (if there are any)
                                if ($data->hasTablespaces() && $tablespaces->recordCount() > 0) {