Febuary 28 2018 - v3.0
This major release fixes some issues reported by users during the
last six months and adds several new features.
* Add colorization of comments.
* Add detection and colorization of user defined function in the SQL
code. Until now only PostgreSQL internal function was highlighted.
* Add new option -B | --comma-break and in CGI the checkbox
"New-line after comma (insert)" to force a newline after each
comma in INSERT statements, columns and values parts.
* Add command line option: -F | --format to be able to change the
output format in CLI mode. At now there is two possible format,
text the default or html. More format can be added in the future.
* Add support to all psql meta commands up to v1O.
There is also some improvement in SQL code formatting.
The move to a new major release is related to the removing of the
html_highlight_code()
method used to apply HTML formatting style.
If you are using your own custom scripts based on the pgFormatter
Perl modules this will break backward compatibility and you will
have to remove the call to html_highlight_code()
in your script.
Here is the new synopsys for an HTML output:
my $beautifier = pgFormatter::Beautify->new();
$beautifier->query( 'select a,b,c from d where e = f' );
$beautifier->format('html');
$beautifier->beautify();
my $nice_html = $beautifier->content();
Note that if you are using the pg_format script provided in the
pgFormatter release you don't have to care about this change.
For the complete list of changes see: https://github.com/darold/pgFormatter/blob/master/ChangeLog