How to remove tables and indexes? I've a file with the SQL statements to create tables, indexes, etc, and another file with data test to use in the test database. Then, I want that they can be removed.

How to remove table and indexes from a database? Is there a generic way to remove them in MySQL and PostgreSQL?
The generic way to "remove" a table is to drop it:

DROP TABLE foo;


When you drop the table all indexes will also be dropped. If you need to drop them separately use 

DROP INDEX foo_index;


For PostgreSQL the easiest way to get rid of all objects in a schema is to drop the schema:

DROP SCHEMA test_schema CASCADE;


Of course you could have found out that yourself by simply looking at the manual:

http://www.postgresql.org/docs/current/static/sql-droptable.html
http://www.postgresql.org/docs/current/static/sql-createindex.html

http://dev.mysql.com/doc/refman/5.5/en/drop-table.html
http://dev.mysql.com/doc/refman/5.5/en/drop-index.html