MDL-32434 allow database_manager->drop_table() for temporary tables
This commit is contained in:
@@ -86,13 +86,29 @@ class postgres_sql_generator extends sql_generator {
|
||||
}
|
||||
|
||||
/**
|
||||
* Given one correct xmldb_table and the new name, returns the SQL statements
|
||||
* Given one correct xmldb_table, returns the SQL statements
|
||||
* to drop it (inside one array).
|
||||
*
|
||||
* @param xmldb_table $xmldb_table The table to drop.
|
||||
* @return array SQL statement(s) for dropping the specified table.
|
||||
*/
|
||||
public function getDropTableSQL($xmldb_table) {
|
||||
$sqlarr = parent::getDropTableSQL($xmldb_table);
|
||||
if ($this->temptables->is_temptable($xmldb_table->getName())) {
|
||||
$this->temptables->delete_temptable($xmldb_table->getName());
|
||||
}
|
||||
return $sqlarr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given one correct xmldb_table, returns the SQL statements
|
||||
* to drop it (inside one array)
|
||||
*
|
||||
* @param xmldb_table $xmldb_table The table to drop.
|
||||
* @return array SQL statement(s) for dropping the specified table.
|
||||
*/
|
||||
public function getDropTempTableSQL($xmldb_table) {
|
||||
$sqlarr = $this->getDropTableSQL($xmldb_table);
|
||||
$this->temptables->delete_temptable($xmldb_table->getName());
|
||||
return $sqlarr;
|
||||
return $this->getDropTableSQL($xmldb_table);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user