Skip to content

Commit

Permalink
Update ChangeLog and version to 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
darold committed Sep 20, 2019
1 parent 8766c27 commit e4fec62
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 7 deletions.
101 changes: 101 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,104 @@
September 20 2019 - v4.1

This is a maintenance release to fix issues reported by users since
the last three month. As usual there is also some improvements and
new features.


* Add -T, --tabs option to make pg_format use tabs instead of space
characters. When this option is used spaces number is set to 1
whatever is the value set to -s, --spaces.

* Allow output to override source file.

* Add option -g, --no-grouping and CGI corresponding checkbox. By
default pgFormatter groups all statements when they are in a
transaction:

BEGIN;
INSERT INTO foo VALUES (1, 'text 1');
INSERT INTO foo VALUES (2, 'text 2');
...
COMMIT;

By disabling grouping of statement pgFormatter will always add an extra
newline characters between statements just like outside a transaction:

BEGIN;

INSERT INTO foo VALUES (1, 'text 1');

INSERT INTO foo VALUES (2, 'text 2');
...

COMMIT;

This might add readability to not DML transactions.

- Add more SQL keyword: REFRESH, MATERIALIZED, EVENT and function
xmltable
- Prevent uppercase of keywords when they are used as column names
in a CREATE TABLE statement.

Here is the complete list of changes and acknowledgments:

- Keep COMMENT ON formatting unchanged when using dollar quoting.
Thanks to Jeremy Palmer for the report.
- Allow to disable grouping of statements in transaction. Thanks to
Francisco Puga for the feature request.
- Fix unwanted formatting when know keywords are used in a CREATE
TABLE statement. Thanks to Jeremy Palmer for the report.
- Add -T, --tabs option to make pg_format use tabs instead of space
characters. Thanks to jen-Ya for the feature request.
- Update regression tests.
- Prevent new line between DEFAULT and VALUES in insert statements.
- Fix bad formatting with single quote code separator. The separator
is replaced with $$ when the code is multi-line, otherwise the
code is kept untouched.
- Allow regression test on specific test file passed as parameter.
- Fix format when "with time out" is used. Thanks to jjangga0214
for the report.
- Fix backslashes at end of string constant that produce wrong
results. Thanks to jen-ya for the report.
- Fix regression tests with REFRESH / MATERIALIZED.
- Add REFRESH and MATERIALIZED to the list of SQL keywords. Thanks
to jen-Ya for the report.
- Fix tabs indentions used outside indent and add regression test
for -n and -T options.
- Fixes to documentation. Thanks to zach valenta for the patch.
- Fix not remove comment starting with -- when the -n option is
used. Thanks to Brady Holt for the report.
- Fix error about STDIN reopened as STDOUT introduced in commit
af63e9e. Thanks to Daniel McAuley for the report.
- Fix newline wrongly forced after function parameters in CTE.
- Allow output to override source file. Thanks to Daniel McAuley
for the report.
- Fix formatting when a token start with CALL. Thanks to Ralph R.
for the report.
- Fix newline in geometry type. Thanks to Sven Over for the report.
- Fix incomplete previous patch.
- Fix missing newline in column list after CTE. Thanks to Giorgi
Modebadze for the report.
- Fix OVERLAPS formatting.
- CGI.pm: correct github link text in footer. Thanks to Stephan
Renatus for the patch
- Fix build of pg function hash.
- Fix wrong formatting in CREATE TABLE statement AS WITH clause.
Thanks to ImreSamu for the report.
- Fix broken indent when AS has parameters.
- Suppress newline in COMMENT ON FUNCTION formatting.
- Fix several indentation issues related to CREATE TABLE with
PARTITION and ALTER statements.
- Fix an other case of bad indentation of EXECUTE in triggers and
undefined value on indentation level.
- Fix an other case of newline introduced in REVOKE statement.
- Fix newline before FROM in REVOKE statement
- Add EVENT keyword and add formatting of CREATE EVENT TRIGGER
statement.
- Fix indentation for an insert statement after a create table
statement in the code of a function. Thanks to LaetitiaJV for
the report.

June 2 2019 - v4.0

This major release fixes a huge list of formatting issues which makes
Expand Down
4 changes: 2 additions & 2 deletions lib/pgFormatter/Beautify.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ pgFormatter::Beautify - Library for pretty-printing SQL queries
=head1 VERSION
Version 4.0
Version 4.1
=cut

# Version of pgFormatter
our $VERSION = '4.1dev';
our $VERSION = '4.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 @@ -11,12 +11,12 @@ pgFormatter::CGI - Implementation of CGI-BIN script to format SQL queries.
=head1 VERSION
Version 4.4
Version 4.1
=cut

# Version of pgFormatter
our $VERSION = '4.0';
our $VERSION = '4.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 @@ -15,12 +15,12 @@ pgFormatter::CLI - Implementation of command line program to format SQL queries.
=head1 VERSION
Version 4.0
Version 4.1
=cut

# Version of pgFormatter
our $VERSION = '4.0';
our $VERSION = '4.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 @@ -33,7 +33,7 @@ local $SIG{ __WARN__ } = sub {
use FindBin;
use lib "$FindBin::RealBin/lib";

our $VERSION = '4.0';
our $VERSION = '4.1';

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

0 comments on commit e4fec62

Please sign in to comment.