pgFormatter

Software Screenshot:
pgFormatter
Software Details:
Version: 1.5 updated
Upload Date: 10 Feb 16
Developer: Darold Gilles
Distribution Type: Freeware
Downloads: 32

Rating: nan/5 (Total Votes: 0)

pgFormatter can remove comments from the code, can enable syntax highlighting in the output for an increased readability, developers can control how the script handles keywords and functions, and they can also customize the indentation size.

SQL code can be copy-pasted inside the application, or it can be uploaded in bulk.

pgFormatter was written specifically for PostgreSQL, but it may work with the output and syntax of other databases as well.

This small tool can be used via its Web-based interface (as a CGI script) or as a classic terminal utility.

By default, pgFormatter will output the beautified SQL code as HTML, but when used from the console, the output is changed to raw text.

What is new in this release:

  • Add useful hint about formating in vi. Thanks to David Fetter for the hint.
  • Prevent newline after open parenthesis and indent back after close when we have count(*) for example.
  • Add test query with a backslash before a quote in samples/ex8.sql.
  • Fix coloring string when the string contained a backslash before a quote. Thanks to Kevin Brannen for the patch.
  • Add RETURNS keywords.
  • Remove newline before the FOR keywords.
  • Add BY to the list of PG keywords to be capitalized.
  • Add new keywords from PostgreSQL 9.5.
  • Reformat queries with FOR and USING, for example: CREATE POLICY policy_even_ids_only ON log FOR ALL TO PUBLIC USING (id % 2 = 0);
  • Fix unescaped character in regex. Thanks to Tom Burnett for the patch.
  • Fix wrong indentation with function that accept FROM clause. Thanks to Adrian Klaver and Alvaro Herrera for the report.
  • Add more test samples about json operators.
  • Add JSON #>> operator and sample. Thanks to Tom Burnett for the patch.
  • Some more JSON operators. Thanks to Hubert depesz Lubaczewski for the patch.
  • JSON operators have to be before normal operators as regexp will match first possible string, so -> will match - first, if it's before in tokenizer. Changing order solves the problem reports by Tom Burnett. Thanks to Hubert depesz Lubaczewski for the patch.
  • Add new json/jsonb functions to list of pg functions.
  • Add JSON operators. Thanks to Tom Burnett for the report.
  • Fix anonymizing failure reported in issue #15. Thanks to Niklas Schmidtmer for the report.
  • Add developer documentation. Thanks to Hubert depesz Lubaczewski for the patch.
  • Fix Beautify.pm with perl 5.20. Thanks to Hubert depesz Lubaczewski for the patch.
  • In Beautify.pm we were not considering the possibility of $last being empty in one condition inside a JOIN, and that gives an exception in perl 5.20. Thanks to Pablo Alvarez de Sotomayor Posadillo for the patch.
  • Split into libraries and programs complete. Thanks to Hubert depesz Lubaczewski for the patch.

What is new in version 1.4:

  • Added HTML break before the footer in CGI context.
  • Added missing SQL::Beautify paternity and update license part of the documentation.
  • Allow file upload in CGI context.
  • Fixed issue in formatting that prevent left back indentation when major keywords were found.
  • Added information in code comments about external files in CGI mode.
  • Force the parser to not insert a new line after the SET keyword when the query begin with it. This is to preserve the single line with queries like SET client_encoding TO "utf8";
  • Added new line after SET keyword to better format UPDATE queries.

What is new in version 1.3:

  • Added HTML break before the footer in CGI context.
  • Added missing SQL::Beautify paternity and update license part of the documentation.
  • Allow file upload in CGI context.
  • Fixed issue in formatting that prevent left back indentation when major keywords were found.
  • Added information in code comments about external files in CGI mode.
  • Force the parser to not insert a new line after the SET keyword when the query begin with it. This is to preserve the single line with queries like SET client_encoding TO "utf8";
  • Added new line after SET keyword to better format UPDATE queries.

Similar Software

Prom
Prom

5 Sep 16

pgShark
pgShark

14 Apr 15

ArangoDB-PHP
ArangoDB-PHP

9 Feb 16

Other Software of Developer Darold Gilles

SysUsage
SysUsage

1 Mar 15

SquidAnalyzer
SquidAnalyzer

10 Feb 16

SendmailAnalyzer
SendmailAnalyzer

10 Feb 16

Comments to pgFormatter

Comments not found
Add Comment
Turn on images!