new unicode table border styles for psql
Hello
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting for
final presentation.
Do you think so this feature is generally interesting and should be in core?
Regards
Pavel
On 21 November 2013 08:09, Pavel Stehule <pavel.stehule@gmail.com> wrote:
Hello
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting for
final presentation.Do you think so this feature is generally interesting and should be in
core?Regards
Pavel
YES!
- Szymon
YES!
+1
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
So here is patch for 9.4
7 new line styles, 2 new border styles, \pset border autocomplete
Regards
Pavel
2013/11/21 Szymon Guz <mabewlun@gmail.com>
Show quoted text
On 21 November 2013 08:09, Pavel Stehule <pavel.stehule@gmail.com> wrote:
Hello
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting for
final presentation.Do you think so this feature is generally interesting and should be in
core?Regards
Pavel
YES!
- Szymon
Attachments:
psql-pretty-borders.patchtext/x-patch; charset=UTF-8; name=psql-pretty-borders.patchDownload+329-29
On 21 November 2013 20:20, Pavel Stehule <pavel.stehule@gmail.com> wrote:
So here is patch for 9.4
7 new line styles, 2 new border styles, \pset border autocomplete
Regards
Pavel
2013/11/21 Szymon Guz <mabewlun@gmail.com>
On 21 November 2013 08:09, Pavel Stehule <pavel.stehule@gmail.com> wrote:
Hello
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting
for final presentation.Do you think so this feature is generally interesting and should be in
core?Regards
Pavel
YES!
- Szymon
That's pretty cool, I'd love to see it in the core, however it doesn't
contain any documentation, so I'm afraid it will be hard to use for people.
thanks,
Szymon
On 21 November 2013 21:15, Szymon Guz <mabewlun@gmail.com> wrote:
On 21 November 2013 20:20, Pavel Stehule <pavel.stehule@gmail.com> wrote:
So here is patch for 9.4
7 new line styles, 2 new border styles, \pset border autocomplete
Regards
Pavel
2013/11/21 Szymon Guz <mabewlun@gmail.com>
On 21 November 2013 08:09, Pavel Stehule <pavel.stehule@gmail.com>wrote:
Hello
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting
for final presentation.Do you think so this feature is generally interesting and should be in
core?Regards
Pavel
YES!
- Szymon
That's pretty cool, I'd love to see it in the core, however it doesn't
contain any documentation, so I'm afraid it will be hard to use for people.thanks,
Szymon
Hi Pavel,
I've found two errors in the documentation at
http://postgres.cz/wiki/Pretty_borders_in_psql
1)
The unicode-double5 style looks like:
x=# select * from t;
┌───┬───┬───┐
│ a │ b │ t │
╞═══╪═══╪═══╡
│ 1 │ 1 │ a │
├───┼───┼───┤
│ 2 │ 2 │ b │
├───┼───┼───┤
│ 3 │ 3 │ c │
└───┴───┴───┘
(3 rows)
(There are horizontal lines between rows)
2) There is no unicode-double6 in psql, however it exists on the website.
regards,
Szymon
I should to appen list of new styles to doc. Style double6 doesnt exist,
because I renamed double5 to bold1 (and created second bold2)
I will update patch tomorrow - it will be in cf4
Regards
Pavel
Dne 21.11.2013 21:37 "Szymon Guz" <mabewlun@gmail.com> napsal(a):
Show quoted text
On 21 November 2013 21:15, Szymon Guz <mabewlun@gmail.com> wrote:
On 21 November 2013 20:20, Pavel Stehule <pavel.stehule@gmail.com> wrote:
So here is patch for 9.4
7 new line styles, 2 new border styles, \pset border autocomplete
Regards
Pavel
2013/11/21 Szymon Guz <mabewlun@gmail.com>
On 21 November 2013 08:09, Pavel Stehule <pavel.stehule@gmail.com>wrote:
Hello
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting
for final presentation.Do you think so this feature is generally interesting and should be in
core?Regards
Pavel
YES!
- Szymon
That's pretty cool, I'd love to see it in the core, however it doesn't
contain any documentation, so I'm afraid it will be hard to use for people.thanks,
SzymonHi Pavel,
I've found two errors in the documentation at
http://postgres.cz/wiki/Pretty_borders_in_psql1)
The unicode-double5 style looks like:
x=# select * from t;
┌───┬───┬───┐
│ a │ b │ t │
╞═══╪═══╪═══╡
│ 1 │ 1 │ a │
├───┼───┼───┤
│ 2 │ 2 │ b │
├───┼───┼───┤
│ 3 │ 3 │ c │
└───┴───┴───┘
(3 rows)(There are horizontal lines between rows)
2) There is no unicode-double6 in psql, however it exists on the website.
regards,
Szymon
On Thu, Nov 21, 2013 at 1:09 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
Hello
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting for
final presentation.
great. hm, maybe we could integrate color? (see:
http://merlinmoncure.blogspot.com/2012/09/psql-now-with-splash-of-color.html).
merlin
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 11/21/13, 2:09 AM, Pavel Stehule wrote:
Hello
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting
for final presentation.Do you think so this feature is generally interesting and should be in core?
Maybe make the border setting a string containing the various characters
by index. Then everyone can create their own crazy borders.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 11/21/2013 04:39 PM, Peter Eisentraut wrote:
On 11/21/13, 2:09 AM, Pavel Stehule wrote:
Hello
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting
for final presentation.Do you think so this feature is generally interesting and should be in core?
Maybe make the border setting a string containing the various characters
by index. Then everyone can create their own crazy borders.
Why not just reinvent termcap / terminfo? :-)
cheers
andrew
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Hello
2013/11/21 Peter Eisentraut <peter_e@gmx.net>
On 11/21/13, 2:09 AM, Pavel Stehule wrote:
Hello
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting
for final presentation.Do you think so this feature is generally interesting and should be in
core?
Maybe make the border setting a string containing the various characters
by index. Then everyone can create their own crazy borders.
I seriously though about it, but not sure if it is good way.
- So we still have to deliver some basic set of styles still.
- People prefer prefabricate solution with simply activation now - so
customization use only a few people
- buitin style requires about 110 bytes and it is safe and verified,
dynamic styling requires some parser, maybe some other checks
So for this use case I prefer very primitive (and simple) design as was
proposed.
Regards
Pavel
Hello
2013/11/21 Merlin Moncure <mmoncure@gmail.com>
On Thu, Nov 21, 2013 at 1:09 AM, Pavel Stehule <pavel.stehule@gmail.com>
wrote:Hello
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting for
final presentation.great. hm, maybe we could integrate color? (see:
http://merlinmoncure.blogspot.com/2012/09/psql-now-with-splash-of-color.html
).
it is next possible enhancing - I would to go forward in small steps,
please :)
minimally (and independent on proposed patch) we can introduce some like
"final regexp filtering" - that can be used for this or other purposes.
Regards
Pavel
Show quoted text
merlin
2013/11/21 Szymon Guz <mabewlun@gmail.com>
On 21 November 2013 21:15, Szymon Guz <mabewlun@gmail.com> wrote:
On 21 November 2013 20:20, Pavel Stehule <pavel.stehule@gmail.com> wrote:
So here is patch for 9.4
7 new line styles, 2 new border styles, \pset border autocomplete
Regards
Pavel
2013/11/21 Szymon Guz <mabewlun@gmail.com>
On 21 November 2013 08:09, Pavel Stehule <pavel.stehule@gmail.com>wrote:
Hello
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting
for final presentation.Do you think so this feature is generally interesting and should be in
core?Regards
Pavel
YES!
- Szymon
That's pretty cool, I'd love to see it in the core, however it doesn't
contain any documentation, so I'm afraid it will be hard to use for people.thanks,
SzymonHi Pavel,
I've found two errors in the documentation at
http://postgres.cz/wiki/Pretty_borders_in_psql1)
The unicode-double5 style looks like:
x=# select * from t;
┌───┬───┬───┐
│ a │ b │ t │
╞═══╪═══╪═══╡
│ 1 │ 1 │ a │
├───┼───┼───┤
│ 2 │ 2 │ b │
├───┼───┼───┤
│ 3 │ 3 │ c │
└───┴───┴───┘
(3 rows)(There are horizontal lines between rows)
2) There is no unicode-double6 in psql, however it exists on the website.
website is related to patch for 9.3 (I add note there)
patch for 9.4 is fixed - and now with small doc
Regards
Pavel
Show quoted text
regards,
Szymon
Attachments:
psql-pretty-borders.patchtext/x-patch; charset=UTF-8; name=psql-pretty-borders.patchDownload+336-32
On Fri, Nov 22, 2013 at 2:23 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
Hello
2013/11/21 Merlin Moncure <mmoncure@gmail.com>
On Thu, Nov 21, 2013 at 1:09 AM, Pavel Stehule <pavel.stehule@gmail.com>
wrote:Hello
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting
for
final presentation.great. hm, maybe we could integrate color? (see:
http://merlinmoncure.blogspot.com/2012/09/psql-now-with-splash-of-color.html).
it is next possible enhancing - I would to go forward in small steps, please
:)minimally (and independent on proposed patch) we can introduce some like
"final regexp filtering" - that can be used for this or other purposes.
Yeah. A per field regexp would do the trick. As you have it, I like
Peter's idea best. Being able to specify the various character codes
makes a lot of sense.
merlin
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
2013/11/22 Merlin Moncure <mmoncure@gmail.com>
On Fri, Nov 22, 2013 at 2:23 AM, Pavel Stehule <pavel.stehule@gmail.com>
wrote:Hello
2013/11/21 Merlin Moncure <mmoncure@gmail.com>
On Thu, Nov 21, 2013 at 1:09 AM, Pavel Stehule <pavel.stehule@gmail.com
wrote:
Hello
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting
for
final presentation.great. hm, maybe we could integrate color? (see:
http://merlinmoncure.blogspot.com/2012/09/psql-now-with-splash-of-color.html
).it is next possible enhancing - I would to go forward in small steps,
please
:)
minimally (and independent on proposed patch) we can introduce some like
"final regexp filtering" - that can be used for this or other purposes.Yeah. A per field regexp would do the trick. As you have it, I like
Peter's idea best. Being able to specify the various character codes
makes a lot of sense.
there is other issue - simply parser will be really user unfriendly, and
user friendly parser will not by simply :(
have you some idea about input format?
Regards
Pavel
Show quoted text
merlin
Pavel Stehule escribi�:
2013/11/21 Peter Eisentraut <peter_e@gmx.net>
Maybe make the border setting a string containing the various characters
by index. Then everyone can create their own crazy borders.I seriously though about it, but not sure if it is good way.
How about having a single "unicode" line style, and then have a
different \pset setting to determine exactly what chars to print? This
wouldn't allow for programmability, but it seems better UI to me.
This proliferation of unicode line style names seems odd.
--
�lvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Fri, Nov 22, 2013 at 8:45 AM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
Pavel Stehule escribió:
2013/11/21 Peter Eisentraut <peter_e@gmx.net>
Maybe make the border setting a string containing the various characters
by index. Then everyone can create their own crazy borders.I seriously though about it, but not sure if it is good way.
How about having a single "unicode" line style, and then have a
different \pset setting to determine exactly what chars to print? This
wouldn't allow for programmability, but it seems better UI to me.
This proliferation of unicode line style names seems odd.
That makes sense to me, especially if you could pass escapes.
merlin
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
2013/11/22 Alvaro Herrera <alvherre@2ndquadrant.com>
Pavel Stehule escribió:
2013/11/21 Peter Eisentraut <peter_e@gmx.net>
Maybe make the border setting a string containing the various
characters
by index. Then everyone can create their own crazy borders.
I seriously though about it, but not sure if it is good way.
How about having a single "unicode" line style, and then have a
different \pset setting to determine exactly what chars to print? This
wouldn't allow for programmability, but it seems better UI to me.
This proliferation of unicode line style names seems odd.
-1
After thinking I don't see any value for common user. Users like you, me,
Merlin are able to parametrize output or patching source code.
Any parametrization expect some secure store, that will support exchange of
styles. And it expect robust parser of unicode strings, or ascii strings
with unicode escaped chars.
We cannot parse a escaped unicode chars now on client side, and cost of
parser is higher of benefit externally parametrized borders.
Regards
Pavel
Show quoted text
--
Įlvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
On 11/21/2013 10:39 PM, Peter Eisentraut wrote:
On 11/21/13, 2:09 AM, Pavel Stehule wrote:
I wrote new styles for psql table borders.
http://postgres.cz/wiki/Pretty_borders_in_psql
This patch is simply and I am think so some styles can be interesting
for final presentation.Do you think so this feature is generally interesting and should be in core?
Maybe make the border setting a string containing the various characters
by index. Then everyone can create their own crazy borders.
I vote for doing it this way.
We would provide a default setting, and the documentation would show
other examples. Perhaps even set up a "repository" on a wiki page or
something.
--
Vik
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
there is other issue - simply parser will be really user unfriendly, and
user friendly parser will not by simply :(
If simple things are hard to implement, get yourself better tools.
Each time we get on the topic of improving scripting abilities for our
interactive tool, it's always the same problem: having to invent a
scripting language with a whole parser is just too much work.
Maybe it's time we step back a little and consider real scripting
solutions to embed into psql, and pgbench too:
http://ecls.sourceforge.net/ LGPL Common Lisp
http://www.gnu.org/software/guile/ LGPL Scheme, Javascript, Emacs Lisp
http://www.lua.org/ MIT Lua
Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers