Skip to content

Commit 4766603

Browse files
committed
Update ChangeLog and version to 5.9
1 parent bc77bd9 commit 4766603

File tree

5 files changed

+58
-27
lines changed

5 files changed

+58
-27
lines changed

ChangeLog

Lines changed: 51 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
December 21 2025 - v5.9
2+
3+
This release adds several formatting improvements and fixes some issues
4+
reported by users since the last release.
5+
6+
Here is the complete list of changes and acknowledgments:
7+
8+
- Fix wierd nested indenting when using multi conditional join with integer 0
9+
value. Thanks to Neszt Tibor for the report.
10+
- Fix bad indentation with simple join. Thanks to anttilinno for the report.
11+
- Fix indentation after RAISE EXCEPTION ... USING. Thanks to Ray Ng for the
12+
report.
13+
- Fix bad formatting in CASE statements with variable assignments. Thanks to
14+
Serhii Khoma for the report.
15+
- Limit the number of perl version tested
16+
- Add CI action to test pgFormatter on commit push
17+
- Fix dollar quote sign when attached to a word. Thanks to Andrew Jackson for
18+
the report.
19+
- Fix indentation of UNION in RETURN QUERY clause. Thanks to birgersp for the
20+
report.
21+
- Fix false negative in keyword detection with QUERY after RETURN
22+
- Add pre-commit hook config. Thanks to Alexey Shrub for the patch.
23+
- Add extra newline after ariga/atlas related comment line. Thanks to Jay Babu
24+
for the feature request.
25+
- Fix incorrect formatting in PL/pgSQL when using DECLARE and CASE. Thanks to
26+
lkslawek for the report.
27+
- Fix incorrect formatting of scientific notation with exponents. Thanks to
28+
Ray Ng for the report. Add regression tests cases.
29+
- Fix incorrectly removing extra parenthesis in CREATE POLICY statements.
30+
Thanks to Julian Niedermeier for the report.
31+
132
September 14 2025 - v5.8
233

334
This release adds several formatting improvements ans fixes some issues
@@ -10,18 +41,18 @@ Here is the complete list of changes and acknowledgments:
1041
- pgFormatter is now able to distinguish between single values and
1142
multiple values INSERT statement and to format them differently.
1243
Here an example of the output format:
13-
44+
1445
-- multiple values form
1546
INSERT INTO tempy_mc_tempface
1647
VALUES
1748
('tempy'),
1849
('mc'),
1950
('tempface');
20-
51+
2152
-- single values form
2253
INSERT INTO tempy_mc_tempface
2354
VALUES ('another', 'world');
24-
55+
2556
Thanks to Paul Gelardi for the feature request.
2657
- Fix indentation issue of INSERT statements in DO block. Thanks to Paul Gelardi for the report.
2758
- Fix version in main script
@@ -67,7 +98,7 @@ This maintenance release fixes some issues reported by users since the last
6798
release and adds some improvements.
6899

69100
Improvements:
70-
101+
71102
* Add support to pg_vector operator <#>. Thanks to Taylor Brown for the report
72103
* Add support for the @? jsonb-jsonpath operator. Thank to Simon Whitaker for
73104
the patch.
@@ -134,7 +165,7 @@ This maintenance release fixes some issues reported by users since the last
134165
month and some improvements.
135166

136167
Improvements:
137-
168+
138169
* Prevent newline in function supporting the FROM keyword like substring().
139170
* Add multi-line formatting on TRUNCATE with a table list. Thanks to GabenGar
140171
for the feature request.
@@ -154,7 +185,7 @@ This maintenance release fixes issues reported by users since the last five
154185
months with some improvements and new features.
155186

156187
New options and features:
157-
188+
158189
- Add option --no-space-function, when used pgFormatter removes the
159190
space character between a function call and the open parenthesis that
160191
follow. By default pgFormatter adds a space character, for example:
@@ -633,16 +664,16 @@ new features.
633664
* Add option -g, --nogrouping and CGI corresponding checkbox. By
634665
default pgFormatter groups all statements when they are in a
635666
transaction:
636-
667+
637668
BEGIN;
638669
INSERT INTO foo VALUES (1, 'text 1');
639670
INSERT INTO foo VALUES (2, 'text 2');
640671
...
641672
COMMIT;
642-
673+
643674
By disabling grouping of statement pgFormatter will always add an extra
644675
newline characters between statements just like outside a transaction:
645-
676+
646677
BEGIN;
647678

648679
INSERT INTO foo VALUES (1, 'text 1');
@@ -651,7 +682,7 @@ new features.
651682
...
652683

653684
COMMIT;
654-
685+
655686
This might add readability to not DML transactions.
656687

657688
- Add more SQL keyword: REFRESH, MATERIALIZED, EVENT and function
@@ -886,16 +917,16 @@ Here is the complete list of changes and acknowledgments:
886917
- Add -W, --wrap-after option to set number of column after which
887918
lists must be wrapped. Default: puts every item on its own line.
888919
This applies to SELECT and FROM list. For example:
889-
920+
890921
SELECT a, b, c, d FROM t_1, t_2, t3 WHERE a = 10 AND b = 10;
891-
922+
892923
is formatted into:
893-
924+
894925
SELECT a, b, c, d
895926
FROM t_1, t_2, t3
896927
WHERE a = 10
897928
AND b = 10;
898-
929+
899930
Note this formatting doesn't fits well with sub queries in list.
900931
Thanks to Bruce Momjian for the feature request.
901932
- Add information about the (Neo)vim plugin used to format code for
@@ -1134,11 +1165,11 @@ complete list of changes:
11341165
internally by pg_format when it is called with the -F html option
11351166
or in CGI mode. This compatibility break justify a change of the
11361167
major version number.
1137-
1168+
11381169
Note that this breaks backward compatibility if you are using your
11391170
own custom scripts. With a complete upgrade and the use of the
11401171
pg_format script and libraries everything should work as before.
1141-
1172+
11421173
- Improve the CGI interface where the footer bar overlaps.
11431174
- The CGI library also support a new internal parameter/option
11441175
$self->{ 'colorize' } used to disable HTML output formatting
@@ -1190,10 +1221,10 @@ months. This release also adds some improvements in code formatting.
11901221
- Fix indentation in CTE. Thanks to Jakob Egger for the report.
11911222
- Add two command line option to defined where comma must appears
11921223
in a parameter list:
1193-
1224+
11941225
-b | --comma-start: in a parameters list, start with a comma (see -e)
11951226
-e | --comma-end : in a parameters list, end with a comma (default)
1196-
1227+
11971228
The CGI interface adds a new checkbox to force comma at beginning.
11981229
Default is lines end with a comma. Thanks to fnwiya for the
11991230
feature request.
@@ -1313,9 +1344,9 @@ jsonb_set, pg_last_committed_xact, pg_xact_commit_timestamp.
13131344
There is also a useful hint added to documentation to be able to format
13141345
you SQL code from vi by adding a simple line to .vimrc. This hint is taken
13151346
from David Fetter's blog : http://people.planetpostgresql.org/dfetter/index.php?/archives/78-Formatting!.html
1316-
1347+
13171348
Here is the complete list of other changes:
1318-
1349+
13191350
- Add useful hint about formating in vi. Thanks to David Fetter for the hint.
13201351
- Prevent newline after open parenthesis and indent back after close when we have count(*) for example.
13211352
- Add test query with a backslash before a quote in samples/ex8.sql.

lib/pgFormatter/Beautify.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ pgFormatter::Beautify - Library for pretty-printing SQL queries
2929
3030
=head1 VERSION
3131
32-
Version 5.8
32+
Version 5.9
3333
3434
=cut
3535

3636
# Version of pgFormatter
37-
our $VERSION = '5.8';
37+
our $VERSION = '5.9';
3838

3939
# Inclusion of code from Perl package SQL::Beautify
4040
# Copyright (C) 2009 by Jonas Kramer

lib/pgFormatter/CGI.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ pgFormatter::CGI - Implementation of CGI-BIN script to format SQL queries.
1212
1313
=head1 VERSION
1414
15-
Version 5.8
15+
Version 5.9
1616
1717
=cut
1818

1919
# Version of pgFormatter
20-
our $VERSION = '5.8';
20+
our $VERSION = '5.9';
2121

2222
use pgFormatter::Beautify;
2323
use File::Basename;

lib/pgFormatter/CLI.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ pgFormatter::CLI - Implementation of command line program to format SQL queries.
1515
1616
=head1 VERSION
1717
18-
Version 5.8
18+
Version 5.9
1919
2020
=cut
2121

2222
# Version of pgFormatter
23-
our $VERSION = '5.8';
23+
our $VERSION = '5.9';
2424

2525
use autodie;
2626
use pgFormatter::Beautify;

pg_format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ local $SIG{ __WARN__ } = sub {
3333
use FindBin;
3434
use lib "$FindBin::RealBin/lib";
3535

36-
our $VERSION = '5.8';
36+
our $VERSION = '5.9';
3737

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

0 commit comments

Comments
 (0)