Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[GENERAL] enhanced linestyles for psql

1 view
Skip to first unread message

Pavel Stehule

unread,
May 24, 2012, 9:33:38 AM5/24/12
to
hello

I wrote patch for PostgreSQL 9.1 and 9.2 that adds more linestyles and
border styles to console

http://postgres.cz/wiki/Pretty_borders_in_psql

Regards

Pavel Stehule

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

Alban Hertroys

unread,
May 24, 2012, 10:24:33 AM5/24/12
to
On 24 May 2012 15:33, Pavel Stehule <pavel....@gmail.com> wrote:
> hello
>
> I wrote patch for PostgreSQL 9.1 and 9.2 that adds more linestyles and
> border styles to console

Nice job!
I'm not entirely enthusiastic about the option names though. Would it
help to split the setting into several?

For example:
\pset borders-inside double single (double horizontal inside borders,
single vertical)
\pset borders-outside double

Or, since you can't really mix outside border-styles:
\pset border-style <outside> <horizontal> <vertical>

I'm not sure whether it would be desirable to have more control over
inside borders, for example per column or row (or even cells)?

Just something to ponder ;)

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

Pavel Stehule

unread,
May 24, 2012, 10:33:21 AM5/24/12
to
2012/5/24 Alban Hertroys <hara...@gmail.com>:
> On 24 May 2012 15:33, Pavel Stehule <pavel....@gmail.com> wrote:
>> hello
>>
>> I wrote patch for PostgreSQL 9.1 and 9.2 that adds more linestyles and
>> border styles to console
>
> Nice job!

Thank you :)

> I'm not entirely enthusiastic about the option names though. Would it
> help to split the setting into several?

I am sorry, but I cannot to change it. Now it is compatible with
builtin functionality in console. A change means longer patch and
more necessary work for porting to new versions. So sorry

>
> For example:
> \pset borders-inside double single (double horizontal inside borders,
> single vertical)
> \pset borders-outside double

and this type of configuration is not possible - a syntax for psql
settings should be very simple (primitive)

>
> Or, since you can't really mix outside border-styles:
> \pset border-style <outside> <horizontal> <vertical>
>
> I'm not sure whether it would be desirable to have more control over
> inside borders, for example per column or row (or even cells)?
>
> Just something to ponder ;)

ook - if you have other ideas - other design, please, send it.

Regards

Pavel

Raghavendra

unread,
May 24, 2012, 12:40:03 PM5/24/12
to
hello
I wrote patch for PostgreSQL 9.1 and 9.2 that adds more linestyles and
border styles to console
http://postgres.cz/wiki/Pretty_borders_in_psql

Thank you. And really a great patch to psql console lover's... :)

http://postgres.cz/wiki/Enhanced-psql

Is this also compatible to 9.1 ? 

---
Regards,
Raghavendra
EnterpriseDB Corporation

Pavel Stehule

unread,
May 24, 2012, 7:32:17 PM5/24/12
to
2012/5/24 Raghavendra <raghave...@enterprisedb.com>:
>> hello
>> I wrote patch for PostgreSQL 9.1 and 9.2 that adds more linestyles and
>> border styles to console
>> http://postgres.cz/wiki/Pretty_borders_in_psql
>
>
> Thank you. And really a great patch to psql console lover's... :)
>
> http://postgres.cz/wiki/Enhanced-psql
>
> Is this also compatible to 9.1 ?
>

no, this was prepared for 8.4. These features was just experiment and
only smaller subset is in core now.

Regards

Pavel


> ---
> Regards,
> Raghavendra
> EnterpriseDB Corporation
> Blog: http://raghavt.blogspot.com/

Raghavendra

unread,
May 24, 2012, 9:33:09 PM5/24/12
to
>
> http://postgres.cz/wiki/Enhanced-psql
>
> Is this also compatible to 9.1 ?
>

no, this was prepared for 8.4. These features was just experiment and
only smaller subset is in core now.


Oh ok. Thank you for the info. 

Multi-Headers, Macros of psql 8.4 were very interesting features, sustaining them in 9.1 would have matured psql console alot.

--Raghav

Pavel Stehule

unread,
May 24, 2012, 11:45:29 PM5/24/12
to
2012/5/25 Raghavendra <raghave...@enterprisedb.com>:
I believe so some features - like advanced formatting will be accepted
sometime. Macros are little bit different story - it is relative
difficult implement them in current psql, because code is complex -
there are unclean and unreadable support of readline and interactive
mode. I had a idea of noninteractive console, that can support macros
- but there are lot of issues still. I would to work on some better
integration between client and server inlined procedures, and on
simpler using psql from bash. Implementing own full macro language is
not necessary. Probably better way is enable extending console
statements with possibility to call external scripts.

Regards

Pavel

>
> --Raghav
0 new messages