pgFormatter v1.1

From: Gilles Darold <gilles(dot)darold(at)dalibo(dot)com>
To: pgsql-announce(at)postgresql(dot)org
Subject: pgFormatter v1.1
Date: 2012-12-28 10:11:38
Message-ID: 50DD705A.50105@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce

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

Browse pgsql-announce by date

  From Date Subject
Next Message David Fetter 2012-12-31 07:25:32 == PostgreSQL Weekly News - December 30 2012 ==
Previous Message Devart 2012-12-25 13:10:10 New Product Launch – dbForge Data Compare for PostgreSQL