Netbeans Java SQL Generator is a plugin that automatically generates SQL code (currently for MySQL and PostgreSQL) and Java database methods (such as insertIntoTable, update, delete, and createTable) from variables in a Java class. It comes with many options and possibilities to customize the generated SQL and code for your needs. It works with Netbeans version 6.9 or later on any Netbeans supported system.
pgFormatter is a SQL formatter/beautifier which supports keywords from SQL-92, SQL-99, SQL-2003, SQL-2008, and SQL-2011, and PostgreSQL-specific keywords. It can work as a console program or as a CGI system. It will automatically detect its environment and output as text or as HTML according to the context.