Are there any good and free tools for managing a PostgreSQL database?
pgAdmin and psql, those are the tools I use. A PHP-script isn't very usefull for database management, too slow and many problems with transactions: What to do when something goes wrong? Commit or rollback? This makes tools like phpmyadmin and phpPgAdmin pretty useless, when the script is done, the database connection will be closed. There is nothing to commit or rollback, your SQL script is already gone.

Learn SQL and any tool that can keep it's databases connections open, will do the job.