Обсуждение: SQL formatting

Поиск
Список
Период
Сортировка

SQL formatting

От
jarek
Дата:
Hello!

    First of all I'd like to thank all the pgAdmin developers for a great
job!
    As I like to have nice formatted SQL, I've written simple script in
python to format SQL procedures. It would be nice, to integrate it with
pgAdmin.
    This script doesn't cover all PostgreSQL structures, but is enough for
me. If there will be some interest, I can improve it.
    I think that it should be enough to add call to this script from SQL
query dialog menu. I've no experience with wxWidgets, so it may be
better if someone more skilled will integrate it.

best regards
Jarek Tabor


Вложения

Re: SQL formatting

От
"J.F. Oster"
Дата:
Hello jarek,

Upcoming release will have a new feature, external formatting tool.
You can setup pgAdmin to invoke your script with Ctrl-Shift-F in the
query editor. There are a few other utilities available, see
discussion http://www.postgresql.org/message-id/110456625.20150503104217@mail.ru

http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=40509183da5524e4ed499ab6eece20a4fdda3a32

Beta is available already, please test it: http://www.postgresql.org/ftp/pgadmin3/release/v1.22.0-beta1/

Regarding integration, it's questionable because Python is not
available out of the box on every supported platform...

Monday, October 26, 2015, 11:50:59 AM, you wrote:

j> Hello!

j>         First of all I'd like to thank all the pgAdmin developers for a great
j> job!
j>         As I like to have nice formatted SQL, I've written simple script in
j> python to format SQL procedures. It would be nice, to integrate it with
j> pgAdmin.
j>         This script doesn't cover all PostgreSQL structures, but is enough for
j> me. If there will be some interest, I can improve it.
j>         I think that it should be enough to add call to this script from SQL
j> query dialog menu. I've no experience with wxWidgets, so it may be
j> better if someone more skilled will integrate it.

j> best regards
j> Jarek Tabor




--
Best regards,
 J.F.