pgFormatter 1.1 --------------- pgFormatter is a SQL formatter/beautifier supports keywords from SQL-92, SQL-99, SQL-2003, SQL-2008, SQL-2011 and PostgreSQL specifics keywords. Even if it is dedicated to PostgreSQL it may works with any other databases too.
pgFormatter can work as a console program or as a CGI. It will automatically detect his environment and output as text or as HTML following the context. This is the same query parser than the one embedded in pgBadger plus all the Postgresql functions and was first used to improve the SQL beautifier in an independent way. Some of these improvements can not be included into pgBadger for performances reason. In console mode, you can format all SQL queries from stdin as follow: cat samples/ex1.sql | /usr/local/bin/pg_format - or from a file with output to an other file: /usr/local/bin/pg_format -f 2 -c samples/ex1.sql -o result.sql In CGI mode, just copy pg_format under a cgi-script directory and get it from your favorite browser, you will have something like in the demo site: http://sqlformat.darold.net/ Future versions of pgFormatter will tend to include a PLPGSQL code beautifier. About: ------ * Download: https://sourceforge.net/projects/pgformatter/ * Development: https://github.com/darold/pgFormatter * Web/Demo site: http://sqlformat.darold.net/ * Documentation: https://github.com/darold/pgFormatter/blob/master/README Cheers, -- Gilles Darold - Dalibo http://dalibo.com - http://dalibo.org -- Sent via pgsql-announce mailing list (pgsql-announce@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-announce