Re: SQL formatter improvements

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
Cc: Edson Richter <edsonrichter(at)hotmail(dot)com>, "pgadmin-support(at)lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: SQL formatter improvements
Date: 2022-09-02 08:27:20
Message-ID: CA+OCxoydWSwB1mT+KwAMVEjHWjwvMU-wREUzt5NEN5Nkyi0nDg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Fri, 2 Sept 2022 at 06:13, Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
wrote:

> Hi Edson
>
> pgAdmin 4 uses CodeMirror to write/show SQL queries. It is not possible to
> plug an external formatter at the moment.
> Can you please create a feature request so we will check the feasibility?
>

I can't imagine it would be that hard - the formatter is a 3rd party Python
library anyway; we just feed the current contents of CodeMirror to it, and
then replace it with the text that comes back.

Having pluggable formatters does seem like a nice idea. All we'd do is pass
the text to an external process and then grab the results (presumably
through stdin/out), through pretty much the same mechanism (just replacing
the existing Python call to the formatter).

>
> On Sun, Aug 28, 2022 at 8:25 PM Edson Richter <edsonrichter(at)hotmail(dot)com>
> wrote:
>
>> Hi!
>>
>>
>>
>> I would like to know if it is possible (currently or planned for future)
>> to “plug” an external formatter instead the native one?
>>
>> I would particulary interested in using Eclipse Formatter, which is very
>> flexible.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> ER
>>
>>
>>
>>
>>
>> Enviado do Email <https://go.microsoft.com/fwlink/?LinkId=550986>
>> para Windows
>>
>>
>>
>
>
> --
>
> <http://www.enterprisedb.com>
>
> Akshay Joshi
>
> Principal Software Architect
>
> +91 9767888246
>
> www.enterprisedb.com
>
> <https://www.linkedin.com/company/edbpostgres>
> <https://twitter.com/edbpostgres?lang=en>
> <https://www.facebook.com/EDBpostgres>
> <https://www.instagram.com/EDBpostgres/>
>

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

EDB: https://www.enterprisedb.com

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Polgár Benedek 2022-09-03 08:57:38 query tool - current_timestamp
Previous Message Akshay Joshi 2022-09-02 05:13:03 Re: SQL formatter improvements