Download Latest Version pgFormatter-5.3.tar.gz (1.3 MB)
Email in envelope

Get an email when there's a new version of pgFormatter

Home / 1.6
Name Modified Size InfoDownloads / Week
Parent folder
README.txt 2017-01-23 1.5 kB
pgFormatter-1.6.tar.gz 2017-01-23 38.0 kB
Totals: 2 Items   39.6 kB 0
January 23 2017 - v1.6

This release fixes several issues and adds lot of improvements in
query formatting.

Command line option --placeholder or -p has been added to be able
to set regex to find code that must not be formatted. For example,
in query like:

	SELECT * FROM projects WHERE projectnumber
		IN <<internalprojects>> AND username = <<loginname>>;

you may want pgFormatter to not interpret << and >> as bit-shift
keywords and modify your code snippsets. You can use a Perl regular
expression to instruct pgFormatter to keep some part of the query
untouched. For example:

        pg_format samples/ex9.sql -p '<<(?:.*)?>>'

will not format the bit-shift like operators.

Here is the complete list of changes:

  - Improve SQL formatting by reducing space with parenthesis and
    cast with ::.
  - Add two sample file to test placeholder feature and WITH query.
  - Fix missing newline after INNER JOIN. Thanks to Julien Rouhaud
    for the report.
  - Fix whitespace placed in between the E and the quote character.
    Thanks to clijunky for the report.
  - Fix lots of operators reported on issue #22. Thanks to Laurenz
    Albe for the report and list of missing operators.
  - Fix version number in lib/pgFormatter library files.
  - Add -p | --placeholder command line option to prevent pgFormatter
    to replace some part of the SQL queries. Thanks to jhelberg for
    the feature request.
  - Fix bad formatting with anonymized values in queries. Thanks to
    Pilat66 for the report.

Source: README.txt, updated 2017-01-23