proposal (9.5) : psql unicode border line styles - Mailing list pgsql-hackers

From Pavel Stehule
Subject proposal (9.5) : psql unicode border line styles
Date
Msg-id CAFj8pRAE13gkThOhFK=Bo3Stcgim2_KwBSQ5FeBu-bcF3YznYA@mail.gmail.com
Whole thread Raw
Responses Re: proposal (9.5) : psql unicode border line styles  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
This experiment fails, but there are some interesting tips in discuss.

So I propose little bit different proposal - choose one predefined style for any table lines elements. These styles are active only when "linestyle" is unicode.

So possible line elements are:

* border,
* header_separator,
* row_separator,
* column_separator,

Possible styles (for each element)

* none,
* single,
* double,
* thick,

It should to have enough variability to define all styles proposed early. I hope, so this proposal is secure and simple for usage. Styles should be persistently saved in .psqlrc file - and some examples can be in documentation.

Usage:

\pset linestyle_border double
\pset linestyle_header_separator single
\pset linestyle_row_separator single
\pset linestyle_column_separator single

\pset linestyle unicode

╔═══╤════════════╤═══════╗
║ a │     b      │   c   ║
╟───┼────────────┼───────╢
║ 1 │ 2012-05-24 │ Hello ║
╟───┼────────────┼───────╢
║ 2 │ 2012-05-25 │ Hello ║
║   │            │ World ║
╚═══╧════════════╧═══════╝
(2 rows)


Comments, ideas ?

Regards

Pavel



 



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: atexit_callback can be a net negative
Next
From: Tom Lane
Date:
Subject: Re: Unportable coding in reorderbuffer.h