Feature request : Reindentation of code

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

Feature request : Reindentation of code

От:
"Cousin Florence" <fcousin@sopragroup.com>
Дата:
Hi,

It would be very nice to have a tool to reindent SQL queries.
Indeed, at work, me and my colleague often have to work on queries that
we extract from Java code or PL/pgSQL, in order to modify or study them.
Most of the time, these queries are not indented, and they are often
very complicated. So we have to manually indent them, and that can be
very boring and time consuming.
Some complain that proprietary tools have this feature, and not pgadmin
III.

Regards,


Florence

Re: Feature request : Reindentation of code

От:
Dave Page <dpage@pgadmin.org>
Дата:
On Tue, Mar 2, 2010 at 5:32 PM, Cousin Florence  wrote:
> Hi,
>
> It would be very nice to have a tool to reindent SQL queries.
> Indeed, at work, me and my colleague often have to work on queries that
> we extract from Java code or PL/pgSQL, in order to modify or study them.
> Most of the time, these queries are not indented, and they are often
> very complicated. So we have to manually indent them, and that can be
> very boring and time consuming.
> Some complain that proprietary tools have this feature, and not pgadmin
> III.

That might make a nice GSoC project...



-- 
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
PG East Conference: http://www.enterprisedb.com/community/nav-pg-east-2010.do

Re: Feature request : Reindentation of code

От:
John Gage <jsmgage@numericable.fr>
Дата:
May I pile on by saying that incorporating Vim features if not Vim  
itself into a discretionary editor (Vim being decidedly not  
proprietary) would make pgAdmin (and pg itself) into an even greater  
wonder of the world.

Gratuitously,

John


On Mar 2, 2010, at 6:32 PM, Cousin Florence wrote:

> Hi,
>
> It would be very nice to have a tool to reindent SQL queries.
> Indeed, at work, me and my colleague often have to work on queries  
> that
> we extract from Java code or PL/pgSQL, in order to modify or study  
> them.
> Most of the time, these queries are not indented, and they are often
> very complicated. So we have to manually indent them, and that can be
> very boring and time consuming.
> Some complain that proprietary tools have this feature, and not  
> pgadmin
> III.
>
> Regards,
>
>
> Florence
>
> -- 
> Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-support


Re: Feature request : Reindentation of code

От:
Josh Berkus <josh@agliodbs.com>
Дата:
On 3/2/10 9:33 AM, Dave Page wrote:
> On Tue, Mar 2, 2010 at 5:32 PM, Cousin Florence  wrote:
>> Hi,
>>
>> It would be very nice to have a tool to reindent SQL queries.
>> Indeed, at work, me and my colleague often have to work on queries that
>> we extract from Java code or PL/pgSQL, in order to modify or study them.
>> Most of the time, these queries are not indented, and they are often
>> very complicated. So we have to manually indent them, and that can be
>> very boring and time consuming.
>> Some complain that proprietary tools have this feature, and not pgadmin
>> III.
> 
> That might make a nice GSoC project...

+1.  You wanna volunteer as a GSoC mentor?

--Josh Berkus


Re: Feature request : Reindentation of code

От:
Dave Page <dpage@pgadmin.org>
Дата:
On Tue, Mar 2, 2010 at 5:42 PM, Josh Berkus  wrote:
> On 3/2/10 9:33 AM, Dave Page wrote:
>> On Tue, Mar 2, 2010 at 5:32 PM, Cousin Florence  wrote:
>>> Hi,
>>>
>>> It would be very nice to have a tool to reindent SQL queries.
>>> Indeed, at work, me and my colleague often have to work on queries that
>>> we extract from Java code or PL/pgSQL, in order to modify or study them.
>>> Most of the time, these queries are not indented, and they are often
>>> very complicated. So we have to manually indent them, and that can be
>>> very boring and time consuming.
>>> Some complain that proprietary tools have this feature, and not pgadmin
>>> III.
>>
>> That might make a nice GSoC project...
>
> +1.  You wanna volunteer as a GSoC mentor?

I'm one of the 'liason mentors'.

-- 
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
PG East Conference: http://www.enterprisedb.com/community/nav-pg-east-2010.do

Re: Feature request : Reindentation of code

От:
Pavel Stehule <pavel.stehule@gmail.com>
Дата:
2010/3/2 Dave Page :
> On Tue, Mar 2, 2010 at 5:32 PM, Cousin Florence  wrote:
>> Hi,
>>
>> It would be very nice to have a tool to reindent SQL queries.
>> Indeed, at work, me and my colleague often have to work on queries that
>> we extract from Java code or PL/pgSQL, in order to modify or study them.
>> Most of the time, these queries are not indented, and they are often
>> very complicated. So we have to manually indent them, and that can be
>> very boring and time consuming.
>> Some complain that proprietary tools have this feature, and not pgadmin
>> III.
>
> That might make a nice GSoC project...

pg core has 2/3 components for this task - parser and serialisation.
It missing only some rules for pretty printing. It cold be a good
contrib module (with a few hooks).

Pavel

>
>
>
> --
> Dave Page
> EnterpriseDB UK: http://www.enterprisedb.com
> PG East Conference: http://www.enterprisedb.com/community/nav-pg-east-2010.do
>
> --
> Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-support
>

Re: Feature request : Reindentation of code

От:
Josh Berkus <josh@agliodbs.com>
Дата:

> pg core has 2/3 components for this task - parser and serialisation.
> It missing only some rules for pretty printing. It cold be a good
> contrib module (with a few hooks).
> 

Yeah, just for the love of mike don't start a discussion of *how* you
should indent stuff on a public list.  You'll never get anything done.  ;-)

(serious suggestion: use the indenting rules outlined in Celko's book)

--Josh Berkus


Re: Feature request : Reindentation of code

От:
Pavel Stehule <pavel.stehule@gmail.com>
Дата:
2010/3/2 Josh Berkus :
>
>> pg core has 2/3 components for this task - parser and serialisation.
>> It missing only some rules for pretty printing. It cold be a good
>> contrib module (with a few hooks).
>>
>
> Yeah, just for the love of mike don't start a discussion of *how* you
> should indent stuff on a public list.  You'll never get anything done.  ;-)
>
> (serious suggestion: use the indenting rules outlined in Celko's book)

I like these rules and using it

Pavel

>
> --Josh Berkus
>
>

Re: Feature request : Reindentation of code

От:
Guillaume Lelarge <guillaume@lelarge.info>
Дата:
Hi Florence,

Good to see you here :)

Le 02/03/2010 18:32, Cousin Florence a écrit :
> [...]
> It would be very nice to have a tool to reindent SQL queries.

I agree.

> Indeed, at work, me and my colleague often have to work on queries that
> we extract from Java code or PL/pgSQL, in order to modify or study them.
> Most of the time, these queries are not indented, and they are often
> very complicated. So we have to manually indent them, and that can be
> very boring and time consuming.

I know. I also have to do that from time to time.

> Some complain that proprietary tools have this feature, and not pgadmin
> III.

Would be a nice feature. When your husband told me about it, I forgot to
add a ticket on this. Thansk for reminding me, this is now done:
http://code.pgadmin.org/trac/ticket/146 .

Now we just need to find someone or some time to work on it :)


-- 
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com

FAQ