Stop pretending that we'll ever work with another DBMS.
[mailshears.git] / lib / mv / plugins / roundcube.rb
index 4b3ebcb5d20084d8c342445d2b5566a98324d6d5..7f345a4a70bb73094d02110ce8f6ff05d6a315e5 100644 (file)
@@ -20,26 +20,14 @@ class RoundcubeMv
 
     sql_queries = ['UPDATE users SET username = $1 WHERE username = $2;']
 
-    begin
-      connection = PGconn.connect(@db_host,
-                                  @db_port,
-                                  @db_opts,
-                                  @db_tty,
-                                  @db_name,
-                                  @db_user,
-                                  @db_pass)
-
-      sql_queries.each do |sql_query|
-        connection.query(sql_query, [dst.to_s(), src.to_s()])
-      end
-
-      connection.close()
-
-    rescue PGError => e
-      # Pretend like we're database-agnostic in case we ever are.
-      raise DatabaseError.new(e)
+    connection = PGconn.connect(@db_host, @db_port, @db_opts, @db_tty,
+                                @db_name, @db_user, @db_pass)
+
+    sql_queries.each do |sql_query|
+      connection.query(sql_query, [dst.to_s(), src.to_s()])
     end
 
+    connection.close()
   end
 
 end