Re: new unicode table border styles for psql

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Szymon Guz <mabewlun(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: new unicode table border styles for psql
Date: 2013-11-27 14:14:35
Message-ID: CAFj8pRBJed8ZQ5KMdH=Zw9=ex2jXTFG-zX=j_ADo70_16WW-PA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2013/11/26 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>

>
>
>
> 2013/11/26 Peter Eisentraut <peter_e(at)gmx(dot)net>
>
>> On 11/22/13, 3:26 AM, Pavel Stehule wrote:
>> > website is related to patch for 9.3 (I add note there)
>> >
>> > patch for 9.4 is fixed - and now with small doc
>>
>> I think it would help if we considered the new border styles and the new
>> line styles separately.
>>
>> I don't find the new border styles to be particularly useful. They just
>> use up vertical screen space, which is usually more precious than
>> vertical space. Is there a situation where you would find these styles
>> to be more useful than the existing ones? Keep in mind that pset is
>> usually set permanently, so it wouldn't be practical to use a different
>> border style depending on how the query results shape up (like \x auto).
>>
>> Now for the linestyles. I can see how some of them are attractive, but
>> several of them have poor aesthetics, I think. I don't see a reason to
>> accept 7 new styles just for fun. If I had to choose, I'd consider
>> -double1 and -double4 to be acceptable.
>>
>
I am sending reduced patch

I add a double1, double4 and double5 - renamed to double1,double2, double3

support for border 3 and 4 removed

postgres=# \pset linestyle double1 \pset border 2 \l
Line style (linestyle) is double1.
Border style (border) is 2.
List of databases
┌───────────┬──────────┬──────────┬─────────────┬─────────────┬───────────────────────┐
│ Name │ Owner │ Encoding │ Collate │ Ctype │ Access
privileges │
╞═══════════╪══════════╪══════════╪═════════════╪═════════════╪═══════════════════════╡
│ postgres │ postgres │ UTF8 │ en_US.UTF-8 │ en_US.UTF-8
│ │
│ template0 │ postgres │ UTF8 │ en_US.UTF-8 │ en_US.UTF-8 │
=c/postgres │
│ │ │ │ │ │
postgres=CTc/postgres │
│ template1 │ postgres │ UTF8 │ en_US.UTF-8 │ en_US.UTF-8 │
=c/postgres │
│ │ │ │ │ │
postgres=CTc/postgres │
└───────────┴──────────┴──────────┴─────────────┴─────────────┴───────────────────────┘
(3 rows)

postgres=# \pset linestyle double2 \pset border 2 \l
Line style (linestyle) is double2.
Border style (border) is 2.
List of databases
╔═══════════╤══════════╤══════════╤═════════════╤═════════════╤═══════════════════════╗
║ Name │ Owner │ Encoding │ Collate │ Ctype │ Access
privileges ║
╟───────────┼──────────┼──────────┼─────────────┼─────────────┼───────────────────────╢
║ postgres │ postgres │ UTF8 │ en_US.UTF-8 │ en_US.UTF-8
│ ║
║ template0 │ postgres │ UTF8 │ en_US.UTF-8 │ en_US.UTF-8 │
=c/postgres ║
║ │ │ │ │ │
postgres=CTc/postgres ║
║ template1 │ postgres │ UTF8 │ en_US.UTF-8 │ en_US.UTF-8 │
=c/postgres ║
║ │ │ │ │ │
postgres=CTc/postgres ║
╚═══════════╧══════════╧══════════╧═════════════╧═════════════╧═══════════════════════╝
(3 rows)

postgres=# \pset linestyle double3 \pset border 2 \l
Line style (linestyle) is double3.
Border style (border) is 2.
List of databases
╔═══════════╦══════════╦══════════╦═════════════╦═════════════╦═══════════════════════╗
║ Name ║ Owner ║ Encoding ║ Collate ║ Ctype ║ Access
privileges ║
╠═══════════╬══════════╬══════════╬═════════════╬═════════════╬═══════════════════════╣
║ postgres ║ postgres ║ UTF8 ║ en_US.UTF-8 ║ en_US.UTF-8
║ ║
║ template0 ║ postgres ║ UTF8 ║ en_US.UTF-8 ║ en_US.UTF-8 ║
=c/postgres ║
║ ║ ║ ║ ║ ║
postgres=CTc/postgres ║
║ template1 ║ postgres ║ UTF8 ║ en_US.UTF-8 ║ en_US.UTF-8 ║
=c/postgres ║
║ ║ ║ ║ ║ ║
postgres=CTc/postgres ║
╚═══════════╩══════════╩══════════╩═════════════╩═════════════╩═══════════════════════╝
(3 rows)

Pavel

>
>

Attachment Content-Type Size
linestyle-double.patch text/x-patch 5.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2013-11-27 14:23:38 Re: doPickSplit stack buffer overflow in XLogInsert?
Previous Message Robert Haas 2013-11-27 14:12:06 Re: Shave a few instructions from child-process startup sequence