Fwd: [pgadmin-support] Format SQL (external tool) - Mailing list pgadmin-hackers

From Shane StClair
Subject Fwd: [pgadmin-support] Format SQL (external tool)
Date
Msg-id CAPyomk5i1qoNGg3YwrEnScJkYea20fc_WbwS8WTkaAXgoyDOmA@mail.gmail.com
Whole thread Raw
Responses Re: [pgadmin-support] Format SQL (external tool)
List pgadmin-hackers
[Moved to pgadmin-hackers]

Original message:

Saturday, February 1, 2014, 2:17:20 AM, you wrote:
Hi list,

Just suggesting an idea. It would be really nice to be able
to configure an external command to format SQL in pgAdmin. After
configuring the external tool path in prefs, user hits a key combo
(Shift-Ctrl F?) and the highlighted query text (or all text if
none highlighted) gets run through the formatter and replaces the
original text in the query window. Would be flexible for the user
and seems fairly simple to implement in pgAdmin. Just a thought!


One response from J.F.:

From: J.F. Oster <jinfroster@mail.ru>
Date: Sat, Feb 1, 2014 at 10:06 AM
Subject: Re: [pgadmin-support] Format SQL (external tool)
To: Shane StClair <shane@axiomalaska.com>
Cc: pgadmin-support@postgresql.org


Hello Shane,

I'd like to see some code beautifier in PgAdmin too.
Do you already have an eye to a CLI tool for this job?

I saw Free SQL Formatter (http://fsqlf.sourceforge.net/) under LGPL,
which seems ok. May be, we can adopt it as a built-in default
formatter (hope it will compile under MacOS, Solaris and FreeBSD).
If things go well, it can be developed to support Postgre's SQL
extensions and PL/pgSQL constructs as well.

In short, seems a good idea to me, I could participate in it's
implementation :)

P.S. Should this be posted to [pgadmin-hackers]?

--
Best regards,
 J.F.

pgadmin-hackers by date:

Previous
From: Akshay Joshi
Date:
Subject: Re: Fixed some compiler warnings
Next
From: Shane StClair
Date:
Subject: Re: [pgadmin-support] Format SQL (external tool)