Skip to content

Commit

Permalink
Update ChangeLog and version to 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
darold committed Sep 2, 2017
1 parent 5afe369 commit 9cd215f
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 8 deletions.
53 changes: 52 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
September 02 2017 - v2.1

This minor release fixes several issues reported by users since four
months. This release also adds some improvements in code formatting.

- Add support to new psql meta-command from v10.
- Remove new line before ORDER BY with string_agg and group_concat
function call. Thanks to Huy Pham for the report.
- Fix CREATE TYPE format. Thanks to Fabian Zeindl for the report.
- Fix fix full outer join formatting. Thanks to Jakob Egger for the
report.
- Fix indentation in CTE. Thanks to Jakob Egger for the report.
- Add two command line option to defined where comma must appears
in a parameter list:

-b | --comma-start: in a parameters list, start with a comma (see -e)
-e | --comma-end : in a parameters list, end with a comma (default)

The CGI interface adds a new checkbox to force comma at beginning.
Default is lines end with a comma. Thanks to fnwiya for the
feature request.
- Fix use of uninitialized value in pattern match. Thanks to Gajus
Kuizinas for the report.
- Fix missing space after a function name especially in ALTER
FUNCTION calls.
- Add sample to regression test on CTE, CREATE TYPE and dynamic code
formatting.
- Prevent dynamic code formatting. By default pgFormatter takes all
code between single quote as string constant and do not perform
any formatting on this code. It is common to use a string as
code separator to avoid doubling single quote in dynamic code
generation, in this case pgFormatter can fail to auto detect
the code separator. By default it will search for any string after
the EXECUTE keyword starting with dollar sign. If it can not auto
detect your code separator you can use the command line option -S
or --separator to set the code separator that must be used. Thanks
to Alvaro Herrera for the report.
- Fix undetected case of BEGIN keyword when lowercase.
- Add test case for GRANT and DISTINCT FROM formatting.
- Remove newline between DISTINCT and FROM. Thanks to Sebastian
Albert for the report.
- Fix GRANT formatting. Thanks to Vesa Karjalainen for the report.
- Make it possible to run pg_format via symlink. For example, if
pgFormatter is in /opt/pgFormatter and there is a symlink like
/usr/local/bin/pg_format -> /opt/pgFormatter/pg_format
then previous version wouldn't work when called via symlink, as
it would search for libs in /usr/local/bin/lib/, and not in
/opt/pgFormatter/lib.
- Move COALESCE from SQL keyword to SQL function to prevent new line
after comma in the parameters.

May 07 2017 - v2.0

This major release adds a plpgsql code beautifier. This makes pgFormatter
Expand Down Expand Up @@ -30,7 +81,7 @@ formatting.
- Prevent newline after a closing parenthesis but before an operator.
- Prevent new line when a comma is followed by a quote

January 23 2017 - v2.0
January 23 2017 - v1.6

This release fixes several issues and adds lot of improvements in
query formatting.
Expand Down
4 changes: 2 additions & 2 deletions lib/pgFormatter/Beautify.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ pgFormatter::Beautify - Library for pretty-printing SQL queries
=head1 VERSION
Version 2.0
Version 2.1
=cut

# Version of pgFormatter
our $VERSION = '2.0';
our $VERSION = '2.1';

# Inclusion of code from Perl package SQL::Beautify
# Copyright (C) 2009 by Jonas Kramer
Expand Down
4 changes: 2 additions & 2 deletions lib/pgFormatter/CGI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ pgFormatter::CGI - Implementation of CGI-BIN script to format SQL queries.
=head1 VERSION
Version 2.0
Version 2.1
=cut

# Version of pgFormatter
our $VERSION = '2.0';
our $VERSION = '2.1';

use pgFormatter::Beautify;
use File::Basename;
Expand Down
4 changes: 2 additions & 2 deletions lib/pgFormatter/CLI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ pgFormatter::CLI - Implementation of command line program to format SQL queries.
=head1 VERSION
Version 2.0
Version 2.1
=cut

# Version of pgFormatter
our $VERSION = '2.0';
our $VERSION = '2.1';

use autodie;
use pgFormatter::Beautify;
Expand Down
2 changes: 1 addition & 1 deletion pg_format
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ local $SIG{ __WARN__ } = sub {
use FindBin;
use lib "$FindBin::RealBin/lib";

our $VERSION = '2.0';
our $VERSION = '2.1';

# Find out whether current run should be treated as CGI or CLI
my $program;
Expand Down

0 comments on commit 9cd215f

Please sign in to comment.