@@ -420,6 +420,15 @@ protected function createPrimaryKeySql($fields) {
returnimplode(', ',$return);
}
/**
* {@inheritdoc}
*/
publicfunctiontableExists($table){
$prefixInfo=$this->getPrefixInfo($table,TRUE);
return(bool)$this->connection->query("SELECT 1 FROM pg_tables WHERE schemaname = :schema AND tablename = :table",array(':schema'=>$prefixInfo['schema'],':table'=>$prefixInfo['table']))->fetchField();
}
functionrenameTable($table,$new_name){
if(!$this->tableExists($table)){
thrownewSchemaObjectDoesNotExistException(t("Cannot rename @table to @table_new: table @table doesn't exist.",array('@table'=>$table,'@table_new'=>$new_name)));