Format

Started by Ramesh Tover 10 years ago10 messagesgeneral
Jump to latest
#1Ramesh T
rameshparnanditech@gmail.com

Hi All,
How to change sql format to look beautiful and understandable
using pgadmin3 or else ther tools for postgres.

any help appreciated..

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: Ramesh T (#1)
Re: Format

CREATE FUNCTION
CREATE VIEW

As yes, I am being mostly serious - though I have been pondering seeing
what tools can do as opposed to the manual formatting I've been
performing. Even a basic linter would be helpful...

The big problem is you need to define what it means to be beautiful.
Understandable is a totally different area and that is more where views and
functions come in so you can provide names to the various constructs you
are using. CTE/WITH facilitate this as well.

David J.

On Mon, Sep 28, 2015 at 8:45 AM, Ramesh T <rameshparnanditech@gmail.com>
wrote:

Show quoted text

Hi All,
How to change sql format to look beautiful and understandable
using pgadmin3 or else ther tools for postgres.

any help appreciated..

#3Igor Neyman
ineyman@perceptron.com
In reply to: Ramesh T (#1)
Re: Format

Hi All,
How to change sql format to look beautiful and understandable using pgadmin3 or else ther tools for postgres.

any help appreciated..

Are you looking for SQL editor?
If that’s the case, take a look at contexteditor.org

Regards,
Igor Neyman

#4David G. Johnston
david.g.johnston@gmail.com
In reply to: Igor Neyman (#3)
Re: Format

On Mon, Sep 28, 2015 at 1:59 PM, Igor Neyman <ineyman@perceptron.com> wrote:

Hi All,

How to change sql format to look beautiful and understandable
using pgadmin3 or else ther tools for postgres.

any help appreciated..

Are you looking for SQL editor?

If that’s the case, take a look at contexteditor.org

​format => alter; all I see in the linked editor is highlighting.​..

David J.

#5Igor Neyman
ineyman@perceptron.com
In reply to: David G. Johnston (#4)
Re: Format

From: David G. Johnston [mailto:david.g.johnston@gmail.com]
Sent: Monday, September 28, 2015 3:14 PM
To: Igor Neyman <ineyman@perceptron.com>
Cc: Ramesh T <rameshparnanditech@gmail.com>; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Format

On Mon, Sep 28, 2015 at 1:59 PM, Igor Neyman <ineyman@perceptron.com<mailto:ineyman@perceptron.com>> wrote:
Hi All,
How to change sql format to look beautiful and understandable using pgadmin3 or else ther tools for postgres.

any help appreciated..

Are you looking for SQL editor?
If that’s the case, take a look at contexteditor.org<http://contexteditor.org&gt;

​format => alter; all I see in the linked editor is highlighting.​..

David J.

Not only, there is little of formatting, like TABs.
But, even highlighting helps.

Regards,
Igor Neyman

#6David G. Johnston
david.g.johnston@gmail.com
In reply to: Igor Neyman (#5)
Re: Format

Not only, there is little of formatting, like TABs.

But, even highlighting helps.

​Since pgAdminIII does highlighting I figured the OP wanted something
more...I know what I am looking is more than just highlighting.

David J.

#7Andreas Joseph Krogh
andreas@visena.com
In reply to: Ramesh T (#1)
Re: Format

På mandag 28. september 2015 kl. 14:45:00, skrev Ramesh T <
rameshparnanditech@gmail.com <mailto:rameshparnanditech@gmail.com>>:
Hi All,           How to change sql format to look beautiful and
understandable using pgadmin3 or else ther tools for postgres.
 
any help appreciated..

 
Use IntelliJ IDEA community-edition, which is free:
https://www.jetbrains.com/idea/download/
 
It is a JAVA-IDE, but the support for PostgreSQL is excellent. It comes with
syntax-highligting, code-completion, DB-browser etc.
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas@visena.com <mailto:andreas@visena.com>
www.visena.com <https://www.visena.com&gt;
<https://www.visena.com&gt;

 

#8Ramesh T
rameshparnanditech@gmail.com
In reply to: Ramesh T (#1)
Re: Format

On Tue, Sep 29, 2015 at 6:43 PM, Ramesh T <rameshparnanditech@gmail.com>
wrote:

Show quoted text

in my mind to be beautiful ,avoid confusion to understand sql query code

like

select abcd,cde,rfg,count(*),bcd,cde,rfg,count(*),bcd,cde,rfg,count(*) ;

if some one written, then newer or code reader understand easily
select abcd,
cde,
rfg,
count(*),
...,
..,
...,
like line by line

in postgres direct option format is not available.i want see code intended
proper.
in context editor i didn't find format option only like lower to upper..

On Mon, Sep 28, 2015 at 11:20 PM, David G. Johnston <
david.g.johnston@gmail.com> wrote:

CREATE FUNCTION
CREATE VIEW

As yes, I am being mostly serious - though I have been pondering seeing
what tools can do as opposed to the manual formatting I've been
performing. Even a basic linter would be helpful...

The big problem is you need to define what it means to be beautiful.
Understandable is a totally different area and that is more where views and
functions come in so you can provide names to the various constructs you
are using. CTE/WITH facilitate this as well.

David J.

On Mon, Sep 28, 2015 at 8:45 AM, Ramesh T <rameshparnanditech@gmail.com>
wrote:

Hi All,
How to change sql format to look beautiful and understandable
using pgadmin3 or else ther tools for postgres.

any help appreciated..

#9Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Ramesh T (#8)
Re: Format

On 09/29/2015 06:13 AM, Ramesh T wrote:

On Tue, Sep 29, 2015 at 6:43 PM, Ramesh T <rameshparnanditech@gmail.com
<mailto:rameshparnanditech@gmail.com>> wrote:

in my mind to be beautiful ,avoid confusion to understand sql query code

like

select abcd,cde,rfg,count(*),bcd,cde,rfg,count(*),bcd,cde,rfg,count(*) ;

if some one written, then newer or code reader understand easily
select abcd,
cde,
rfg,
count(*),
...,
..,
...,
like line by line

in postgres direct option format is not available.i want see code
intended proper.
in context editor i didn't find format option only like lower to
upper..

http://sqlformat.darold.net/

To install locally:
https://github.com/darold/pgFormatter

http://format-sql.de/

To install locally:
https://github.com/paetzke/format-sql

On Mon, Sep 28, 2015 at 11:20 PM, David G. Johnston
<david.g.johnston@gmail.com <mailto:david.g.johnston@gmail.com>> wrote:

CREATE FUNCTION
CREATE VIEW

As yes, I am being mostly serious - though I have been pondering
seeing what tools can do as opposed to the manual formatting
I've been performing. Even a basic linter would be helpful...

The big problem is you need to define what it means to be
beautiful. Understandable is a totally different area and that
is more where views and functions come in so you can provide
names to the various constructs you are using. CTE/WITH
facilitate this as well.

David J.

On Mon, Sep 28, 2015 at 8:45 AM, Ramesh T
<rameshparnanditech@gmail.com
<mailto:rameshparnanditech@gmail.com>> wrote:

Hi All,
How to change sql format to look beautiful and
understandable using pgadmin3 or else ther tools for postgres.

any help appreciated..

--
Adrian Klaver
adrian.klaver@aklaver.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#10Ramesh T
rameshparnanditech@gmail.com
In reply to: Adrian Klaver (#9)
Re: Format

Nice, thank you.

On Tue, Sep 29, 2015 at 11:16 PM, Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

Show quoted text

On 09/29/2015 06:13 AM, Ramesh T wrote:

On Tue, Sep 29, 2015 at 6:43 PM, Ramesh T <rameshparnanditech@gmail.com
<mailto:rameshparnanditech@gmail.com>> wrote:

in my mind to be beautiful ,avoid confusion to understand sql query
code

like

select
abcd,cde,rfg,count(*),bcd,cde,rfg,count(*),bcd,cde,rfg,count(*) ;

if some one written, then newer or code reader understand easily
select abcd,
cde,
rfg,
count(*),
...,
..,
...,
like line by line

in postgres direct option format is not available.i want see code
intended proper.
in context editor i didn't find format option only like lower to
upper..

http://sqlformat.darold.net/

To install locally:
https://github.com/darold/pgFormatter

http://format-sql.de/

To install locally:
https://github.com/paetzke/format-sql

On Mon, Sep 28, 2015 at 11:20 PM, David G. Johnston
<david.g.johnston@gmail.com <mailto:david.g.johnston@gmail.com>>
wrote:

CREATE FUNCTION
CREATE VIEW

As yes, I am being mostly serious - though I have been pondering
seeing what tools can do as opposed to the manual formatting
I've been performing. Even a basic linter would be helpful...

The big problem is you need to define what it means to be
beautiful. Understandable is a totally different area and that
is more where views and functions come in so you can provide
names to the various constructs you are using. CTE/WITH
facilitate this as well.

David J.

On Mon, Sep 28, 2015 at 8:45 AM, Ramesh T
<rameshparnanditech@gmail.com
<mailto:rameshparnanditech@gmail.com>> wrote:

Hi All,
How to change sql format to look beautiful and
understandable using pgadmin3 or else ther tools for postgres.

any help appreciated..

--
Adrian Klaver
adrian.klaver@aklaver.com