diff --git a/ChangeLog b/ChangeLog index d8882c1..b8e7575 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,68 @@ +Mars 29 2020 - v4.3 + +This is a maintenance release to fix issues reported by users since +the last two months. As usual there is also some improvements and +more formatting supported. + +New option: + + * Add command line option -r | --redshift to add RedShift specific + keywords to the list of SQL keywords to format. + * Add command line option -N | --numbering to include statement + numbering. All formatted statements or block of code are prefixed + by a line with comment: /* Statement # n */. + Also available in CGI mode as a select box option. + +Backward compatibility: + + * Keep simple quote as function code delimiter, previous behavior + was to replace them by $$ and replace all double simple quote in + the code by a single one. Now they are kept unchanged. + * Restore formatting of --comma-break option with INSERT statement, a + regression was introduced in version 4.2. + +Here is the complete list of changes and acknowledgments: + + - Better indentation of sub queries inside a "WITH" clause. Thanks + to Cyril Chaboisseau for the report. + - Fix WHERE tuple indentation. Thanks to Sergey Shepelev for the + report. + - Add more information to the -r | --redshift option + - Document --redshift option. Thanks to Elliott Shugerman for the + patch. + - Fix indentation of join clause in CTE. Thanks to ejabu for the + report. + - Format (NEW|OLD).colname keyword in trigger function. + - Fix formatting of scripts using psql command. Thanks to phiresky + for the report. + - Fix several cases of string literal corrupted by the formatting + - Fix formatting of B'...' string. + - Fix case where column aliases was lost. Thanks to YunheXu for + the report. + - Add AWS RedShift keywords to formatting. + - Fix unwanted formatting of multi-line text. + - Prevent newline between parameters of custom functions. + - Remove newline with an ORDER BY and USING clause in a function. + - Prevent newline in parameters of PREPARE and EXECUTE statement. + - Remove newline in columns list in ANALYZE statement. + - Add several builtin functions to the list of PostgreSQL functions. + - Prevent newline in FOREIGN SERVER OPTIONS list. + - Remove newline inside IN (...) values + - Fix data type formatting after IN, OUT and INOUT in functions + parameters. Thanks to prichardson211 for the report. + - Add new command line option to add statement numbering. Thanks to + Gajus Kuizinas for the feature request. + - Fix wrong indentation of WHERE clause after a JOIN in a CTE. + Thanks to Ejabu for the report. + - Update regression test for --comma-break + - Fix a case sensitive condition and update regression tests. + - Restore formatting of --comma-break option with INSERT statement. + Thanks to Brady Holt for the report. + - Add WITHOUT in the list of keywords and fix formatting of CAST + keyword that was formatted as a function. + - Apply data type formatting after RETURNS and CAST AS clauses. + - Fix formatting of DO ALSO rules. + January 26 2020 - v4.2 This is a maintenance release to fix issues reported by users since diff --git a/lib/pgFormatter/Beautify.pm b/lib/pgFormatter/Beautify.pm index bd324bb..959f3b5 100755 --- a/lib/pgFormatter/Beautify.pm +++ b/lib/pgFormatter/Beautify.pm @@ -19,12 +19,12 @@ pgFormatter::Beautify - Library for pretty-printing SQL queries =head1 VERSION -Version 4.2 +Version 4.3 =cut # Version of pgFormatter -our $VERSION = '4.2'; +our $VERSION = '4.3'; # Inclusion of code from Perl package SQL::Beautify # Copyright (C) 2009 by Jonas Kramer diff --git a/lib/pgFormatter/CGI.pm b/lib/pgFormatter/CGI.pm index 906ee4e..9e84fa6 100755 --- a/lib/pgFormatter/CGI.pm +++ b/lib/pgFormatter/CGI.pm @@ -11,12 +11,12 @@ pgFormatter::CGI - Implementation of CGI-BIN script to format SQL queries. =head1 VERSION -Version 4.2 +Version 4.3 =cut # Version of pgFormatter -our $VERSION = '4.2'; +our $VERSION = '4.3'; use pgFormatter::Beautify; use File::Basename; diff --git a/lib/pgFormatter/CLI.pm b/lib/pgFormatter/CLI.pm index f8f6652..d3a7878 100755 --- a/lib/pgFormatter/CLI.pm +++ b/lib/pgFormatter/CLI.pm @@ -15,12 +15,12 @@ pgFormatter::CLI - Implementation of command line program to format SQL queries. =head1 VERSION -Version 4.2 +Version 4.3 =cut # Version of pgFormatter -our $VERSION = '4.2'; +our $VERSION = '4.3'; use autodie; use pgFormatter::Beautify; diff --git a/pg_format b/pg_format index e5b865c..16322e6 100755 --- a/pg_format +++ b/pg_format @@ -33,7 +33,7 @@ local $SIG{ __WARN__ } = sub { use FindBin; use lib "$FindBin::RealBin/lib"; -our $VERSION = '4.2'; +our $VERSION = '4.3'; # Find out whether current run should be treated as CGI or CLI my $program;