Re: [pgadmin-hackers] Autoformatting - Mailing list pgadmin-hackers

From Jing Li
Subject Re: [pgadmin-hackers] Autoformatting
Date
Msg-id caffbd43-85d2-3209-a9b0-b3c6606e7bf7@mixmax.com
Whole thread Raw
In response to Re: [pgadmin-hackers] Autoformatting  (Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com>)
List pgadmin-hackers
a {word-wrap:normal;word-break:break-word;}.background-contain {background-size:contain;}@media only screen and (max-width:600px) {.container {-webkit-text-size-adjust:none !important;}.container,.palm-one-whole {width:100% !important;min-width:100% !important;}.palm-one-half {width:50% !important;min-width:50% !important;box-sizing:border-box;}blockquote .container,blockquote .container div,blockquote .container table {width:auto !important;min-width:0 !important;position:relative !important;}img {max-width:100%;}.border-outer,.border-middle,.border-inner,.inner,[title="separator"] {width:100% !important;}.innercell {padding:8px !important;}.palm-block {display:block !important;}td.palm-one-whole {display:inline-block !important;padding:0;}td.palm-one-whole:first-child:not(:only-child) {margin-bottom:16px;}td.hostname {padding-top:3px !important;}}@media only screen and (min-width:601px) {.preview-card {max-width:600px !important;}}@media only screen and (min-device-width :320px) and (max-device-width :568px),only screen and (min-device-width :768px) and (max-device-width :1024px),only screen and (max-device-width:640px),only screen and (max-device-width:667px),only screen and (max-width:480px){.container {width:100% !important;min-width:100% !important;}.p,.small,li,font[size="2"],font[size="3"] {font-size:1em !important;}}@media only screen and (min-device-width :320px) and (max-device-width :568px),only screen and (min-device-width :768px) and (max-device-width :1024px),only screen and (min-device-width :1224px) {.message-wrapper {padding-top:6px;}.apple-only[style] {display:block !important;max-height:none !important;line-height:normal !important;overflow:visible !important;height:auto !important;width:100% !important;position:relative !important;}.no-apple {display:none !important;}form {font-size:inherit;}input[type="text"] {height:43px;padding-left:4px !important;}button:hover {cursor:pointer;}}@media only screen and (min-device-width :1224px) {.apple-mail-form {display:block !important;background-color:white !important;}}* [office365] .outlook-com-hidden {display:none !important;}* [office365] .outlook-com-button {display:block;}* [office365] .outlook-com-only {display:block !important;max-height:none !important;line-height:normal !important;overflow:visible !important;height:auto !important;width:100% !important;position:relative !important;}.ExternalClass {width:100%;}.ExternalClass .outlook-com-button {display:block;}.ExternalClass button {height:auto;}.ExternalClass .outlook-com-hidden {display:none !important;}.ExternalClass .outlook-com-only {display:block !important;max-height:none !important;line-height:normal !important;overflow:visible !important;height:auto !important;width:100% !important;position:relative !important;}.ExternalClass .ecxlabels {display:none !important;}.ExternalClass .ecxlabels {display:none !important;}.ExternalClass .ecxarrow {display:none !important;}.ExternalClass cite >div + div {padding:0 0 4px 0;}.ExternalClass .h1 {padding-bottom:5px;}.ExternalClass .h2 {padding-bottom:5px;}.ExternalClass .h3 {padding-bottom:5px;}.ExternalClass [lang="brand-pinterest"] {width:280px !important;}
Hi Murtuza,

We had to put the autoformatting feature on hold for a while to focus on some greenplum work. We have a library in progress but we're not currently far enough along with this to submit a patch.

Thanks,
~Jing



On Wed, Sep 13, 2017 1:13 AM, Murtuza Zabuawala murtuza.zabuawala@enterprisedb.com wrote:
Hello,

Just curious to know if we are still working on this feature? 

--
Regards,
Murtuza

On Mon, May 29, 2017 at 5:21 AM, Dave Page <dpage@pgadmin.org> wrote:
On Sun, May 28, 2017 at 11:54 AM, Robert Eckhardt <reckhardt@pivotal.io> wrote:
>
>
> On Tue, May 9, 2017 at 4:26 AM, Dave Page <dpage@pgadmin.org> wrote:
>>
>>
>> Anyhoo, The standard we try to use in pgAdmin at the moment is slightly
>> different from the example you've given. To add it into the mix...
>>
>> /* Keywords Upper, 4 space indent, commas after, AND/OR after,
>>  * no spaces after ( or before ), or around ::
>>  */
>> SELECT DISTINCT
>>     dep.deptype,
>>     dep.classid,
>>     coalesce(coc.relname, clrw.relname) AS ownertable
>> FROM
>>     pg_depend dep
>>     LEFT JOIN pg_class cl ON dep.objid = cl.oid
>>     LEFT JOIN pg_attribute att ON dep.objid = att.attrelid AND
>> dep.objsubid = att.attnum
>> WHERE
>>     dep.objid = 16385::oid AND
>>     classid IN (
>>         SELECT
>>             oid
>>         FROM
>>             pg_class
>>         WHERE
>>             relname IN ('pg_class', 'pg_constraint')
>>     )
>> ORDER BY
>>     classid,
>>     cl.relkind;
>>
>> There are some subtleties that are open to personal taste there;
>>
>> - Formatting of the sub-select - e.g. should the SELECT directly follow
>> the (, and should the rest be indented accordingly?
>>
>> - Formatting of multiple quals in the joins; e.g. should the qual
>> following the AND be on the next line, and if so, should it be indented one
>> level, or to align with the qual above? Should the first qual be on the next
>> line?
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>
> Sorry I let this linger. Let's go with the style you currently have. With
> respect to your additional comments.

To be clear, I wasn't insisting on that style - but it is (roughly)
what we try to use and what I prefer.

>
> - Sub-Select should be a new line and indented as in your example.

Sounds good.

> - For multiple quals in the joins; the qual following the AND should be on
> the next line, and should it be indented one level

OK.

Thanks!


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

pgadmin-hackers by date:

Previous
From: Ashesh Vashi
Date:
Subject: pgAdmin 4 commit: Handle the executor nodes,which are iso-8859-1 to the E
Next
From: Murtuza Zabuawala
Date:
Subject: [pgAdmin4][Patch]: Fix context menu fontawesome icons